Steve Atherton
|
f306666e21
|
Added commonPrefixLength for StringRefs that takes a prefix skip length.
|
2020-05-10 04:24:11 -07:00 |
Steve Atherton
|
1966dbb576
|
Checkpointing large refactor of how commitSubtree() works regarding internal pages such that now they can be incrementally modified and detecting changes involves far fewer comparison and staging of records.
|
2020-05-08 07:11:51 -07:00 |
Steve Atherton
|
dda0993d16
|
Apply clang-format to Redwood source.
|
2020-04-24 14:12:40 -07:00 |
Steve Atherton
|
d4334256f1
|
Bug fix: BTree::writePages() was not accounting for the small amount of unpredictability in node overhead sizes which could lead to serializing a tree that doesn't fit into its destination page buffer. WritePages() now skips the prefix common to all records in the input set when calling deltaSize() to estimate resulting DeltaTree serialized sizes.
|
2020-04-08 20:18:41 -07:00 |
Steve Atherton
|
9bf0b5e71f
|
RedwoodRecord simplified to remove chunked key-value pair concept. Cursor and InternalCursor updated to be correct (but not optimal) for new record definition. DeltaTree::seek* refactored to support more seek types and with minor code duplication. Lots of debug output improvements. Refactored how bulk pages are written and introduced fill factor percentage (though since internal pages are not yet incrementally modified this is temporarily worse for those).
|
2020-04-06 20:27:30 -07:00 |
Steve Atherton
|
1ed425233a
|
DeltaTree now has two size modes, 2 byte integer offers for <= 65k and 4 byte integer offsets for larger.
|
2020-04-01 04:24:40 -07:00 |
Steve Atherton
|
5a1884d054
|
Leaf page modifications are now made incrementally until the DeltaTree is out of space or the tree is too imbalanced, at which point it falls back to a linear merge and page(s) rebuild.
|
2020-02-21 16:26:44 -08:00 |
Steve Atherton
|
986e533c8c
|
Bug fix, DeltaTree was not updating numItems after erase / insert operations which only change the deleted flag of an existing equivalent entry.
|
2020-02-20 22:49:36 -08:00 |
Steve Atherton
|
9f4e39f1ef
|
DeltaTree now supports inserting a deleted item that is still present as a deleted node by simply clearing the node's deleted flag. Insertion of duplicates (determined by T::compare() == 0) is no longer allowed.
|
2020-02-07 01:00:11 -08:00 |
Steve Atherton
|
9cf9c46668
|
DeltaTree now tracks internal used/free/deleted space, and insert will fail safely if a new item does not fit.
|
2020-02-05 15:30:04 -08:00 |
Steve Atherton
|
9dbb9e4cec
|
DeltaTree now supports node deletion by flagging nodes as deleted (a state which the T::Delta must be able to store and return). DeltaTree::Cursor will hide deleted nodes from view.
|
2020-02-04 01:22:27 -08:00 |
Steve Atherton
|
460c9b78d8
|
DeltaTree improvements. DecodedNodes store non-parent ancestor pointer which enables moveNext() and movePrev() operations to be O(1) from any leaf node. This also enables seekLessThanOrEqual to accept a hint in the form of a cursor with a position close to the target to avoid traversal from the root when the destination is close to the hint. DeltaTree T::compare() now must take a skipLen argument which is used by insert() and seek operations to skip over bytes known to be shared between the new item or query and every node in the tree.
|
2020-01-31 00:32:48 -08:00 |
Stephen Atherton
|
887acae74a
|
DeltaTree cursor equality only needs to check the DecodedNode pointer.
|
2019-12-01 22:28:50 -08:00 |
Stephen Atherton
|
5f1644f293
|
DeltaTree::Reader is now DeltaTree::Mirror and supports insertion into a DeltaTree. DeltaTrees now support an item count, so BTreePage no longer has an item count, so the VersionedBTree format version has been bumped.
|
2019-11-23 00:09:11 -08:00 |
Stephen Atherton
|
61558eea04
|
Implemented page preloading on BTree cursor seeks to enable hiding latency on soon-to-be-read sibling pages. Added random scans with various preload sizes to the set performance unit test. ObjectCache now tracks hits, misses, and pages which were preloaded but then never used prior to eviction. BTree pages no longer store flags because height is sufficient. Removed virtual specifier in classes not designed to be further inherited. Removed old prototype code (PrefixTree, IndirectShadowPager, MemoryPager) as some interface changes are incompatible and they are no longer worth maintaining.
|
2019-11-11 09:54:22 -08:00 |
Stephen Atherton
|
848a344aa7
|
DeltaTree building now passes the prev/next common prefix length, which is effectively a subtree shared prefix, to recursive calls, which enables each new prev/next common prefix comparison to start from the position at which the previous call on the stack left off.
|
2019-09-27 22:56:33 -07:00 |
Stephen Atherton
|
b19ef86ab9
|
Pager2 interface now supports getting a read snapshot at a version and setting the oldest readable version. FIFOQueue now supports pushFront() which is needed for the BTree's incremental tree deletion process.
|
2019-09-27 21:46:24 -07:00 |
Stephen Atherton
|
71ba490cf8
|
Removed use of the C "struct hack" as it is not valid C++. Replaced zero-length members with functions returning a pointer for arrays or a reference for single members.
|
2019-07-02 16:02:58 -07:00 |
Stephen Atherton
|
3e155a2563
|
Bug fixes.
|
2019-05-29 17:38:55 -07:00 |
Stephen Atherton
|
02882dbf00
|
Checkpointing progress, RedwoodRecordRef and DeltaTree tests pass but BTree test does not. RedwoodRecordRef::Delta rewritten to actually do prefix compression on key and integer fields. Added related unit tests and benchmarks. Some improvements to DeltaTree and requirements on its T and Delta types to avoid repeated common prefix discovery.
|
2019-05-29 06:23:32 -07:00 |
Stephen Atherton
|
6660ccd936
|
Large rewrite/refactor from the page format outward. Replaced the in-page format, PrefixTree, with more general and templated implementation of the same concept, DeltaTree, which will be incrementally modifiable soon. New implementation for in-page cursors to use a per-page arena and share decoded binary tree nodes between cursors in the same page. New implementation for internal record B+Tree cursor which uses reference counted path hops which makes cloning a cursor very cheap. New implementation of external facing B+Tree cursor which makes efficient use of two internal cursors to find user-visible KV pairs and return them without copying keys and values except in the case of a large sharded value.
|
2019-02-21 02:46:30 -08:00 |