Skip to content

Commit

Permalink
Cleaned up shrub/tree reading/lookups quite a bit
Browse files Browse the repository at this point in the history
- Added lfsr_shrub_lookupnext/lfsr_tree_lookupnext to deduplicate
  the various tree lookups that need to support inlined sprouts/bptrs.

  Also moved implicit bptr dereferencing here, though this may need
  to be tweaked a bit to support data checksumming.

- Moved inlined sprouts/bptrs into readnext (well, lookupnext really).

  This simplifies things anywhere we just need to read data from these
  trees.

- Renamed lfsr_file_carveshrub/lfsr_file_carvetree ->
  lfsr_shrub_carve/lfsr_tree_carve and changed parameters appropriately.

  Though these aren't so clear cut. lfsr_shrub_carve still needs the
  related file structure to know which mdir to commit to.

  lfsr_shrub_carve will also need significant tweaking to support
  recovery from failed file writes.

This also ends up losing the shrub/tree lookup reuse. There might still
be a way to deduplicate the read logic after shrub/tree lookup, but it's
probably not worth it considering this logic has become a rather small
part of the lookupnext/readnext machinery

Both shrubs and trees end up calling rbyd/btree lookupnext anyways...
  • Loading branch information
geky committed Oct 25, 2023
1 parent bcefc3e commit 36e8f01
Showing 1 changed file with 279 additions and 334 deletions.
Loading

0 comments on commit 36e8f01

Please sign in to comment.