Skip to content

Add clearPersistence(), separate functionality out from shutdown() #1712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Apr 23, 2019

Conversation

thebrianchen
Copy link

No description provided.

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Some drive-by comments, but looks good :)

Copy link
Author

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

also removed boolean flags from shutdown()

Copy link
Author

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

thanks for the help sebastian :)

@@ -216,6 +216,13 @@ export class FirebaseFirestore {
*/
app: any;

/**
* Clears the persistence cache. This can only be called when the client is not running.
Copy link
Contributor

Choose a reason for hiding this comment

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

A few thoughts on this comment:

  • In the enablePersistence comment above we say we "enable persistent storage". Let's describe this comparably.
  • We should also define "not running" concretely: see how enablePersistence defines the before state, but also after deleting the app.
  • We also need to adjust the comment for enablePersistence(), since clearPersistence is allowed.
  • You should indicate that we'll throw an exception if the client is still running
  • You should indicate under which conditions the promise can be rejected.

(And again, all in a separate PR.)

@wilhuff wilhuff assigned thebrianchen and unassigned mikelehen Apr 22, 2019
Copy link
Author

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

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

Resolved @wilhuff comments

@thebrianchen thebrianchen requested review from wilhuff and removed request for hiranya911, Feiyang1 and hsubox76 April 22, 2019 22:40
@thebrianchen thebrianchen removed the request for review from schmidt-sebastian April 23, 2019 00:18
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

A few final nits. Make sure Travis is green before merging.

@thebrianchen thebrianchen changed the title clearPersistence() first pass Add clearPersistence(), separate functionality out from shutdown() Apr 23, 2019
@wilhuff
Copy link
Contributor

wilhuff commented Apr 23, 2019

Good to go!

@thebrianchen thebrianchen merged commit b35ae72 into master Apr 23, 2019
@thebrianchen thebrianchen deleted the bc/schmidt branch April 23, 2019 16:41
@firebase firebase locked and limited conversation to collaborators Oct 11, 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.

4 participants