Skip to content
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

checkAdapter doesn't cleanup test databases #714

Closed
nspaeth opened this issue Jul 18, 2018 · 1 comment
Closed

checkAdapter doesn't cleanup test databases #714

nspaeth opened this issue Jul 18, 2018 · 1 comment
Labels

Comments

@nspaeth
Copy link

nspaeth commented Jul 18, 2018

Case

BUG

Issue

checkAdapter creates test databases that are never deleted, cluttering up the developer tools storage tab.

Info

  • Environment: browser
  • Adapter: (IndexedDB/Localstorage/LevelDB/etc..)
  • Stack: (Typescript, react, mobx)

Code

  import * as RxDB
  RxDB.checkAdapter('idb')

The more you refresh this page, the more db clutter you will see in the indexedDB storage section in developer tools.

@pubkey
Copy link
Owner

pubkey commented Aug 24, 2018

I fixed this problem in the 8.0.0-branch but with some differences in the implementation. I see problems with destroying the database when checkAdapter() in parallel, for example when you reopen your browser tabs and open the app multiple times in the same time.

We now do:

  • Use the same pouchdb-instance each time, so not all the time a different instance will be created.
  • We clean up the test-document.

@pubkey pubkey closed this as completed Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants