Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

New directions in LMDB #14

Merged
merged 21 commits into from
Dec 12, 2016
Merged

New directions in LMDB #14

merged 21 commits into from
Dec 12, 2016

Conversation

chjj
Copy link
Collaborator

@chjj chjj commented Sep 10, 2016

This is a full rewrite on top of the current leveldown codebase.

It passes all current leveldown tests aside from a few I've removed: some LevelDB-specific ones (i.e. compression). The tests that are really failing are the null key/value tests -- I've turned null values into single null bytes ({0}) instead of empty buffers (LMDB doesn't allow for empty values). So, all in all 5 tests are failing, but for technical edge-case reasons.

New additions/changes:

  • All modern iterator options are now available.
  • iterator.seek() has been implemented.
  • All lmdb info/stat properties are exposed via getProperty.
  • Approximate size is currently hacked in but doesn't accurately measure disk usage.
  • leveldown.destroy() has been implemented.
  • sync option has been implemented for put/del/batch.
  • notls has been fixed.

New features:

  • Online Backups - LevelDB doesn't allow for hot backups but LMDB does. I've exposed it as db.backup(path, callback);.
  • noSubdir option.

Todo:

  • Upgrade LMDB itself.
  • Implement leveldown.destroy().
  • Test in practice.
  • s/leveldown/nlmdb/g

Hopefully, now we that we have the code in sync with the latest leveldown code, we can maintain this module more easily. I plan on using this module in production eventually, so I'll definitely be around to care about it.

cc @rvagg

@chjj chjj mentioned this pull request Sep 10, 2016
@chjj
Copy link
Collaborator Author

chjj commented Sep 30, 2016

@rvagg, any thoughts?

@rvagg
Copy link
Owner

rvagg commented Oct 27, 2016

only thought is that I'm glad someone else has time for this! added you as collaborator and npm owner, :shipit:

@chjj
Copy link
Collaborator Author

chjj commented Dec 12, 2016

@rvagg, cool. I'll get something in npm soon.

@chjj chjj merged commit 5ad819f into rvagg:master Dec 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants