Commit Graph

12 Commits

Author SHA1 Message Date
Jack Grigg 166872e49b shardtree: Ensure `LocatedTree` is correct by construction
This ensures that the various existing `unwrap`s are correctly
justified.
2024-11-23 03:47:35 +00:00
Kris Nuttycombe 192cb3ffda shardtree: Remove `Node::Pruned`
In 7e48886fd3, `Node::Pruned` was
introduced in order to fix problems with `LocatedTree::max_position`
resulting from reinsertion of subtree information as children of
a previously pruned subtree represented by a `Node::Leaf` at its
root. This fix introduced a large amount of complexity that is
better resolved by fixing the `max_position` function in a different
way and generally minimizing its usage.
2024-06-27 16:30:57 -06:00
Kris Nuttycombe 88681ae335 shardtree: Reduce dependence upon `LocatedTree::max_position` 2024-06-27 16:30:57 -06:00
Kris Nuttycombe b38b9d5d62 shardtree: Minor cleanups & documentation improvements. 2024-06-27 16:30:52 -06:00
Jack Grigg 020a7d76d7 shardtree: Use `Tree` constructors instead of struct creation
This makes it easier for us to track where new tree nodes are created,
and how the node kinds are used within the `ShardTree` data model.
2024-06-26 14:08:25 +00:00
Kris Nuttycombe 7e48886fd3 shardtree: Add `Pruned` node type
In circumstances where insertion into a subtree results in pruning, and
then a subsequent insertion within the same range contains leaves that
must be retained, it is necessary to be able to distinguish the maximum
position among notes that have been observed but later pruned. This
fixes a bug wherein an insertion into an already-pruned tree could cause
the maximum position reported for the subtree to regress.
2024-05-28 19:22:45 -06:00
Kris Nuttycombe ffc087424d shardtree: Discard `REFERENCE` retention in leaf overwrites.
Also, disallow value-conflicted overwrites at the leaf level.
2024-05-28 17:13:31 -06:00
Kris Nuttycombe 811d384bd4 shardtree: Improve tracing 2024-05-28 15:50:07 -06:00
Jack Grigg 06199d6f45 shardtree: Improve documentation 2023-07-25 17:19:38 +00:00
Jack Grigg 5b4dce85ca shardtree: Switch from `Rc` to `Arc` to make trees `Send` 2023-07-17 21:02:33 +00:00
Jack Grigg 0d531d9309 Move `LocatedTree` into `tree` submodule
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-07-05 19:04:40 +00:00
Jack Grigg 3b05192538 Move `Node` and `Tree` into `tree` submodule
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-07-05 18:50:37 +00:00