You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there any difference in the concurrency logic for bulkGet and where('id').anyOf([...])?
it seems like anyOf has some sort of debounce that suffers from a race condition.
if we call .anyOf rapidly the final result may not be current. it works if we add a short delay between each call.
.bulkGet does not suffer from this, but I'd like to use anyOf so we can sort
The text was updated successfully, but these errors were encountered:
frankleng
changed the title
.anyOf query return is inconsistent but bulkGet works fine
.anyOf query return is inconsistent but .bulkGet works
Apr 16, 2024
anyOf uses an IDBCursor to iterate results sequencially in index order while bulkGet executes multiple calls to IDBObjectStore.get() in parallel.
AnyOf has been almost untouched for 8 years. There have been shaky bugs in the Safari implementation of IDBCursor historically but for the last 3-4 years or so, I haven't heard of any race-condition bugs in IDBCursor particularly.
Would it be possible to create a reproduction of the issue in jsfiddle or similar? That would help a lot.
is there any difference in the concurrency logic for
bulkGet
andwhere('id').anyOf([...])
?it seems like
anyOf
has some sort of debounce that suffers from a race condition.if we call
.anyOf
rapidly the final result may not be current. it works if we add a short delay between each call..bulkGet
does not suffer from this, but I'd like to useanyOf
so we can sortThe text was updated successfully, but these errors were encountered: