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
Deleting ckey should not make dkey inaccessible, but it does with the current implementation:
test/basic.js ....................................... 55/60
not ok should be equivalent
+++ found
--- wanted
-{
- "some": "more data"
-}
+[null]
at:
file: test\basic.js
line: 52
column: 5
function: runTests
source: |
t.same(m.get(dkey), { some: 'more data' })
stack: |
runTests (test\basic.js:52:5)
Object.<anonymous> (test\basic.js:6:1)
run (bootstrap_node.js:394:7)
startup (bootstrap_node.js:149:9)
bootstrap_node.js:509:3
(further results trimmed because the failure causes the rest of the test to break).
Fixing it naively doesn’t work because if you shift the chain down you might orphan a chain from another key with a string representation of [object Object]0, especially if objects are interleaved in the chain (e.g., inserting {} then {toString: () => '[object Object]0'} then another {}). The least mind-bending way to fix this would be to just use buckets at each slot instead of chaining. To preserve memory perhaps the bucket could use a linked-list style or store a single value in itself and only allocate an array to push additional values if necessary.
The text was updated successfully, but these errors were encountered:
Adding this to to
test/basic.js
after theakey
section makes it fail:Deleting
ckey
should not makedkey
inaccessible, but it does with the current implementation:(further results trimmed because the failure causes the rest of the test to break).
Fixing it naively doesn’t work because if you shift the chain down you might orphan a chain from another key with a string representation of
[object Object]0
, especially if objects are interleaved in the chain (e.g., inserting{}
then{toString: () => '[object Object]0'}
then another{}
). The least mind-bending way to fix this would be to just use buckets at each slot instead of chaining. To preserve memory perhaps the bucket could use a linked-list style or store a single value in itself and only allocate an array to push additional values if necessary.The text was updated successfully, but these errors were encountered: