-
-
Notifications
You must be signed in to change notification settings - Fork 44
snapshots seem not to work #43
Comments
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits. 1. Level#43 "snapshots seem not to work" The reason snapshots didn't work in the test, is because the iterator was only opened on the first call to _next. The new version opens the iterator right away in the constructor (if there is no KeyRange error). 2. Level#40 "abstract-leveldown tests aren't all passing anymore" Partially fixed by merging PR Level#42 and further fixed by this commit. 3. Level#3 "stop batch reads after limit is reached" The solution is stop calling cursor.continue() once the limit is reached. The transaction will automatically timeout as prescribed by the spec. idb-wrapper can't be used for this because limit is only respected if autoContinue is true. All 563 tests pass on: * Safari 9.0.3 * Firefox 45.0b2 * Firefox 46.0a2 * Iridium 44.1 (Chrome/44.0.2403.157)
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits. 1. Level#43 "snapshots seem not to work" The reason snapshots didn't work in the test, is because the iterator was only opened on the first call to _next. The new version opens the iterator right away in the constructor (if there is no KeyRange error). 2. Level#40 "abstract-leveldown tests aren't all passing anymore" Partially fixed by merging PR Level#42 and further fixed by this commit. 3. Level#3 "stop batch reads after limit is reached" The solution is stop calling cursor.continue() once the limit is reached. The transaction will automatically timeout as prescribed by the spec. idb-wrapper can't be used for this because limit is only respected if autoContinue is true. All 563 tests pass on: * Safari 9.0.3 * Firefox 45.0b2 * Firefox 46.0a2 * Iridium 44.1 (Chrome/44.0.2403.157)
@juliangruber Just noticed this myself while trying to bring I checked |
Can we implement snapshots after we bring the rest up to par? It seems like this is it's own good chunk of work. |
The thing with IndexedDB is that you can't have both snapshots and proper backpressure. Details in the thread starting here: #46 (comment) |
Memdown is a different story. It works because it's backed by functional-red-black-tree which is a persistent data structure. I.e. iteration happens on an immutable tree, unaffected by simultaneous writes. |
this test (simplified for this issue):
is failing:
@maxogden do you know what's going on here?
The text was updated successfully, but these errors were encountered: