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
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
Added a leaves_prealloc private field to KVTree to track the empty leaves found at recovery time that can't be added to the search tree. This is populated by the Recover method, which previously was detecting but ignoring empty leaves.
class KVTree {
private:
vector<persistent_ptr<KVLeaf>> leaves_prealloc; // persisted but unused leaves
};
Added a corresponding field to KVTreeAnalysis, which is populated by reading the current size of the leaves_prealloc vector.
struct KVTreeAnalysis {
size_t leaf_prealloc; // count of persisted but unused leaves
};
Obviously this is not thread-safe (as there is no locking protection for leaves_prealloc) but this will be addressed as part of #26.
Multiple tests were changed to validate that leaf_prealloc counts were as expected. Several new tests were introduced to validate that preallocated leaves are properly detected and used in subsequent Put operations.
Leaves without any keys present aren't added to the recovery list, so these leaves are leaked.
The text was updated successfully, but these errors were encountered: