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

Confirm correct sorting of keys in iterator #4

Closed
chrbala opened this issue Feb 18, 2018 · 1 comment
Closed

Confirm correct sorting of keys in iterator #4

chrbala opened this issue Feb 18, 2018 · 1 comment

Comments

@chrbala
Copy link
Owner

chrbala commented Feb 18, 2018

This may be resolved with #2. It looks like abstract-leveldown is expecting the keys to be sorted alphabetically, and I'm not sure what the underlying node-lmdb is sorting by.

Example test output:

# test iterator with gte=49999 (midway)
ok 206 undefined
not ok 207 correct number of entries
  ---
    operator: equal
    expected: 50
    actual:   0
  ...
not ok 208 should be equivalent
  ---
    operator: deepEqual
    expected: |-
      [ { key: '50', value: '0.9926293454942214' }, { key: '51', value: '0.36530754007971344' }, { key: '52', value: '0.07948485238433345' }, { key: '53', value: '0.4460314320292509' }, { key: '54', value: '0.6563670401821771' }, { key: '55', value: '0.7778772324231' }, { key: '56', value: '0.6401857734726797' }, { key: '57', value: '0.8552353376818715' }, { key: '58', value: '0.5319237025637298' }, { key: '59', value: '0.5568737819443985' }, { key: '60', value: '0.9624005486051628' }, { key: '61', value: '0.42510185325347893' }, { key: '62', value: '0.11216823705999612' }, { key: '63', value: '0.12620420026129908' }, { key: '64', value: '0.49373167690324027' }, { key: '65', value: '0.030064742250546006' }, { key: '66', value: '0.9132791307734551' }, { key: '67', value: '0.3480505763258064' }, { key: '68', value: '0.10233997012150153' }, { key: '69', value: '0.5664507517525017' }, { key: '70', value: '0.8025281173721805' }, { key: '71', value: '0.5920517761246549' }, { key: '72', value: '0.7022464461638869' }, { key: '73', value: '0.10957992173264319' }, { key: '74', value: '0.7761877436457496' }, { key: '75', value: '0.5781361569669583' }, { key: '76', value: '0.3111166336007185' }, { key: '77', value: '0.4878780537177789' }, { key: '78', value: '0.12655914496335186' }, { key: '79', value: '0.38618150055929523' }, { key: '80', value: '0.31609012678322257' }, { key: '81', value: '0.6589613745332377' }, { key: '82', value: '0.6048494277682703' }, { key: '83', value: '0.2066701342922257' }, { key: '84', value: '0.0018538658409072983' }, { key: '85', value: '0.8492683128917726' }, { key: '86', value: '0.0848514102379645' }, { key: '87', value: '0.9711296854693521' }, { key: '88', value: '0.49853902528205385' }, { key: '89', value: '0.9740776483919469' }, { key: '90', value: '0.6530275273713964' }, { key: '91', value: '0.25511761710292546' }, { key: '92', value: '0.28199455595791534' }, { key: '93', value: '0.57805842900936' }, { key: '94', value: '0.20249379034314852' }, { key: '95', value: '0.3205214395313847' }, { key: '96', value: '0.15968226699990007' }, { key: '97', value: '0.6626543905212701' }, { key: '98', value: '0.08386572138126924' }, { key: '99', value: '0.8048711309013743' } ]
    actual: |-
      []
    stack: |-
      Error: should be equivalent
          at Test.assert [as _assert] (/Users/chris/lmdb-leveldown/node_modules/tape/lib/test.js:212:54)
          at Test.bound [as _assert] (/Users/chris/lmdb-leveldown/node_modules/tape/lib/test.js:64:32)
          at Test.deepEqual.Test.deepEquals.Test.isEquivalent.Test.same (/Users/chris/lmdb-leveldown/node_modules/tape/lib/test.js:380:10)
          at Test.bound [as same] (/Users/chris/lmdb-leveldown/node_modules/tape/lib/test.js:64:32)
          at /Users/chris/lmdb-leveldown/node_modules/abstract-leveldown/abstract/iterator-range-test.js:29:11
          at /Users/chris/lmdb-leveldown/node_modules/abstract-leveldown/testCommon.js:56:11
          at /Users/chris/lmdb-leveldown/src/index.js:281:48
  ...
@chrbala chrbala changed the title Alphabetic sorting of keys Confirm correct sorting of keys in iterator Feb 18, 2018
@chrbala chrbala mentioned this issue Feb 18, 2018
@chrbala
Copy link
Owner Author

chrbala commented Feb 18, 2018

This was not an issue.

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

No branches or pull requests

1 participant