Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: introduce a leaf cache #543

Merged
merged 1 commit into from
Dec 6, 2024
Merged

opt: introduce a leaf cache #543

merged 1 commit into from
Dec 6, 2024

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Nov 4, 2024

This is super raw; will be refined in later PRs. Let's not merge until the full stack is ready.

The cache is populated when leaves are read and when the workload creates new leaves.

Copy link
Contributor Author

rphmeier commented Nov 4, 2024

nomt/src/beatree/leaf_cache.rs Show resolved Hide resolved
nomt/src/beatree/leaf_cache.rs Outdated Show resolved Hide resolved
@@ -108,6 +110,7 @@ impl Tree {
bbn_store,
primary_staging: BTreeMap::new(),
secondary_staging: None,
leaf_cache: leaf_cache::LeafCache::new(32, 1 << 16),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those numbers look magic-y. I assume this is/will be changed in the following PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely, just like the merkle page cache we need to add this to the public API

Copy link
Contributor

OP is confusing, is it ready to land or not?

@rphmeier
Copy link
Contributor Author

rphmeier commented Dec 4, 2024

Yes, I believe it's ready for merge (with the stack above it)

Copy link
Contributor Author

rphmeier commented Dec 6, 2024

Merge activity

  • Dec 5, 7:05 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 5, 7:06 PM EST: A user merged this pull request with Graphite.

@rphmeier rphmeier merged commit 6fab16d into master Dec 6, 2024
8 checks passed
@rphmeier rphmeier deleted the rh-leaf-cache branch December 6, 2024 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants