-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
upgrade pouchdb to 7.3.0 #3807
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
upgrade pouchdb to 7.3.0 #3807
Conversation
|
So was this problem already fixed or did the master branch get changed so that we do not detect the error? |
|
This problem was fixed by this PR. The reason is changed the selector from $gt to $ne to avoid race condition in pouchdb. |
|
Ah, I see. |
|
I feel like this "fix" is a dangerous approach. There was a race condition when using pouchdb 7.3.0 in-memory-adapter and changing the tests to just ignore the race condition doesn't fix the problem (outlined in #3763 (comment).). If you add more tests, this will likely come up again. I'd suggest either:
|
|
I also thought about this before I merged the PR. Many other things are broken in 7.2.2 where queries do not work or Having a query withi Yes we should make a PR with a failing test in the pouchdb repo. But in the past this was not worth the time because pouchdb uses the stale bot which just closes them again. |
|
Ahh... thanks for the context. I didn't realize there were known issues and warts with staying on 7.2.2. I guess 7.3.0 with this race condition is the lesser of two evils? I'm leaving on vacation soon and have a million things to do, but I'll see if I can create a repro and post it as an open PR. |
Yes, at least I think so. |
|
Ok, here is the repro case #3813. I'll also report this over in PouchDB. |
This is a simple repro for a problem discovered in PouchDB 7.3.0. This was originally discovered in RxDB. Discussion here: pubkey/rxdb#3807. ``` 134 passing (2s) 3 pending 1 failing 1) test.memory-adapter.js Race condition initially discovered with PouchDB in-memory-adapter 7.3.0: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) ```
This is a simple repro for a problem discovered in PouchDB 7.3.0. This was originally discovered in RxDB. Discussion here: pubkey/rxdb#3807. ``` 134 passing (2s) 3 pending 1 failing 1) test.memory-adapter.js Race condition initially discovered with PouchDB in-memory-adapter 7.3.0: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) ```
|
FYI, PouchDB accepted the fix proposed and has released it as part of PouchDB 8.0.0. |
|
Yes I know. But the pouchdb storage is deprecated anyways, so I will not update PouchDB. |
|
I know it's another big effort - but I alot of folks would appreciate keep in pouchdb - I think most of react native setup uses pouch db, any change to support pouchdb if it worth it. |
This PR contains:
Describe the problem you have without this PR
CI/CD test fail when upgrade to pouchDB 7.3.0
Fix the issue upgrade to pouchdb 7.3.0