kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
520 stars 44 forks source link

v3 changes #297

Closed jdesboeufs closed 3 months ago

jdesboeufs commented 5 months ago

Hi,

I would like to know what are changes between v2 and v3? Is there breaking changes? What can we expect about stability?

I see many beta versions so I ask before starting an upgrade!

Thank you for all your work on this package ❤️

kriszyp commented 4 months ago

The simplest breaking change is that getRange() now defaults to excluding any metadata entries. This makes it easier to use the default metadata key for shared structures without accidentally including it in range results.

The deeper change is that v3 has a new mechanism in LMDB for tracking free space. This is compatible for upgrades, v2 databases will work fine for upgrading to v3, but it is not compatible for downgrading, v2 will not properly read (free space for writing) from databases used with v3.