- The
sled
project looks dead, so we switch the default backend torocksdb
- Disable the embed serde-based implementations of
KeyEnDe
andValueEnDe
by default
- Add various trie/mpt based functions
- Disable the "vs" feature by default
- Extend the feature of "derive" to "vs"
- Use
bcs
as the default codec
- Make documents consensus with codebase
- Implement KeyEnDeOrdered for some
primitive_types
- Optimize the designs of some encoding related traits
KeyEn
,KeyDe
,KeyEnDe
ValueEn
,ValueDe
,ValueEnDe
- Switch the default codec from
json
tobcs
- Add 'message pack' back to the list of alternative codec
- coresponding feature:
msgpack
- coresponding feature:
- Fix issues related to the
prune
operation
- Tuning feature settings and code details
- Add embed supports for 'primitive-types v0.12.x'
- Switch the default codec from
msgpack
tojson
- For better generality and compatibility
- Add more conversion functions for Version/Branch related structures
- Fix issues related to the
prune
operation
No functional changes, just upgraded some necessary dependencies.
- Avoid storing fields that can be derived from other fields
- Save space
- Improve efficiency
- BUT the memory usage during runtime will increase
- BUT the time for the process to restart will increase
- Enhance atomicity guarantees during data changes
- Use shorter names in all APIs
branch_id
==>br_id
branch_name
==>br_name
version_id
==>ver_id
version_name
==>ver_name
- Those 'deleted' KVs of the oldest version will be cleaned up
- Enhance the ability of
prune
and optimize its performance - Start a background thread to clean up orphaned instances asynchronously
- Enable the embed lru-cache of rocksdb if
feature = "rocks_engine"
- Make the supports for the
primitive-types
crate optional
version_chgset_trie_root
- Return the 'trie' root hash of the change set of the target version
- NOTE: this is a realtime-compution operation
- Optimize performance
- Tuning low-level en/decoding mechanism
- Avoid
iter().last()
, useiter().next_back()
- Split the original all-in-one crate into two pieces
vsdb
, path: "vsdb/wrappers"vsdb_core
, path: "vsdb/core"
- The semantic of
clone
has been changed to a deep copy- The semantic of the previous
clone
is inherited byshadow
- NOTE: the newly added
shadow
API is marked asunsafe
- The semantic of the previous
- Add
_mut
methods for variousIter
siter_mut
values_mut
range_mut
- The low-level "does not exist" expression has been changed from 'None' to
&[]
- If you assign a
&[]
,vec![]
orBox<[]>
value to a key, the key will be treated as 'deleted'
- If you assign a
- Remove lru cache
- Tuning
area idx
for LSM-friendly storage - Optimize the implementation of inner length counter
- Enable lru cache when using sled as backend engine
write
functions now have&mut self
definations
- Migrate the repo address to 'github.com/rust-util-collections'
- Optimize conditional compilation attributes
- Enable the
compress
feature by default
- Use absolute importing path in the scope of macro definations
- The embed MerkleTree is removed
- Relax the K/V binding conditions of all structured kinds
- Add more unit tests, test coverage reached 75%
- Tuning options of the backend DB
branch_keep_only
: delete all other branches out of the target list- Will also clean up all orphan versions
- Instance length counters are not atomic
- Multi-thread safety cannot be guaranteed
branch_remove
: the cleanup of branch id is incomplete- The
branch_id_to_branch_name
field is dirty
- The
- Change the callback parameter definition of
iter_op
Add iter-like functions in MapxMkVs
and its derivatives.
iter_op
iter_op_by_branch
iter_op_by_branch_version
iter_op_with_key_prefix
iter_op_with_key_prefix_by_branch
iter_op_with_key_prefix_by_branch_version
- Fix incorrect logic in the
branch_has_versions
function
- Fix incorrect logic in the
prune
function
- Allow creating new branches from an empty base branch
- The initial version should NOT exist
- It may make
prune
useless(common versions may never exist)
- It may make
- The results of those
xxx_list_xxx
APIs are unreliable- Will try to return the first non-empty list for reference since this version
- The branches or versions of every child instance of a composite Vs instance may be different
-
For example:
there are three Vs-structuresstruct Vs0(Vs1, Vs2); struct Vs1; struct Vs2
,
the caller ofVs0
cannot guarantee that other callers will not directly create branches and versions onVs1
orVs2
.
branch_create_xxx
: add a 'force' param to all 'branch_create' prefixed functions- if the value of 'force' is true, a branch with the same name of the target branch will be removed automatically
- Avoid incorrect panic in some APIs of
OrphanVs
get_value -> Value
:=>get_value -> Option<Value>
get_mut -> MutValue
:=>get_mut -> Option<MutValue>
branch_swap
: swap the underlying instance of two branches- Unsafe
- Non-'thread safe'
- Must ensure that there are no reads and writes to these two branches during the execution
- Logically similar to
std::ptr::swap
-
For example:
If you have a master branch and a test branch, the data is always trial-run on the test branch, and then periodically merged back into the master branch.
Rather than merging the test branch into the master branch, and then recreating the new test branch, it is more efficient to just swap the two branches, and then recreating the new test branch.
- Unsafe
branch_is_empty
: check if the specified branch is empty- 'empty' means that no actual data exists on this branch even if there are some empty versions on it
branch_get_default
: get the default branch name of the specified instancebranch_list
: list all branch names of the specified instanceversion_list
: list all version names of the default branchversion_list_by_branch
: list all version names of the specified branchversion_list_globally
: list all version names of the global scope- NOTE: include orphaned versions
version_exists_globally
: check if a version exist in the global scope- NOTE: include orphaned versions
version_has_change_set
: check if a version has made some actual changesversion_clean_up_globally
: clean all orphraned versions in the global scopeversion_revert_globally
: make the specified version disappear from the gloal scope- Unsafe
- Version itself and its corresponding changes will be completely purged from all branches
- For orphan versions, no real-time cleanup will be done
- They will be cleaned up at the time of a 'prune' operation
- Call
version_clean_up_globally
manually when you need it
- Ignore empty branches during pruning
branch_merge_to_force
: merge your branch into the target branch even if different new versions exist on the target branch- Unsafe
prune
: no longer executed on the default branch, the logic now is to calculate the common prefix of the version list of all non-empty branches, and then prune this prefix listprune_by_branch
: was removedbranch_merge_to_parent
:=>branch_merge_to
: support for safely merging into any static ancestor branch
- The version merge operation is no longer limited to merging into its parent branch
- Support merging into any existing branch
- The original branch that was merged will no longer be automatically deleted
- Rename the ambiguous 'Rk' suffix in some structures to 'RawKey'
- Rename the ambiguous 'Rv' suffix in some structures to 'RawValue'
- Each branch will keep a complete copy of the version sequence
- Make data indexing more efficient
- Eliminate the need for recursive queries
- The branch level is removed from the key-value multiple map
- The version id is guaranteed to be unique in the global scope
- So this level has no practical significance any more