Skip to content

Conversation

@schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Oct 30, 2019

This PR:

  • Makes the lease refresh idempotent by moving the primaryStateListener callback outside of the transaction function. Note that it call still get called with primaryStateListener(false), as calling that repeatedly should not have any side effects.
  • Changes transactions to obtain the IndexedDB lease even if they don't already have it.

Addresses #2232

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


await persistence.runTransaction(
'regain lease',
'readwrite-primary',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readwrite-primary-idempotent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Oct 30, 2019
@schmidt-sebastian schmidt-sebastian merged commit 68101ee into master Oct 30, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/leaserefresh branch October 30, 2019 22:55
@hsubox76 hsubox76 added this to the 7.2.3 milestone Oct 30, 2019
@firebase firebase locked and limited conversation to collaborators Nov 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants