Skip to content

merkle_tree_cache: change default size to 1000#14959

Closed
sluongng wants to merge 1 commit intobazelbuild:masterfrom
sluongng:sluongng/merkel-cache-size-1000
Closed

merkle_tree_cache: change default size to 1000#14959
sluongng wants to merge 1 commit intobazelbuild:masterfrom
sluongng:sluongng/merkel-cache-size-1000

Conversation

@sluongng
Copy link
Copy Markdown
Contributor

@sluongng sluongng commented Mar 4, 2022

The implementation of Merkle Tree Cache maintains an in-process map
which cache the Input merkle tree's nodes to save traversal time when
Bazel have to interact with Remote Cache and/or RBE services.

This cache implementation used Caffeine's Soft Values cache which should
be used with predictable maximum cache size.

Set the default cache size to 1000 instead of unlimited(0).
Adjust doc to note that default might not be the most optimal value.

The implementation of Merkle Tree Cache maintains an in-process map
which cache the Input merkle tree's nodes to save traversal time when
Bazel have to interact with Remote Cache and/or RBE services.

This cache implementation used Caffeine's Soft Values cache which should
be used with predictable maximum cache size.

Set the default cache size to 1000 instead of unlimited(0).
Adjust doc to note that default might not be the most optimal value.
@sluongng sluongng requested a review from a team as a code owner March 4, 2022 16:09
This was referenced Mar 4, 2022
@bazel-io bazel-io closed this in b1bf9d6 Mar 7, 2022
@brentleyjones
Copy link
Copy Markdown
Contributor

@bazel-io fork 5.1

brentleyjones pushed a commit to brentleyjones/bazel that referenced this pull request Mar 7, 2022
The implementation of Merkle Tree Cache maintains an in-process map
which cache the Input merkle tree's nodes to save traversal time when
Bazel have to interact with Remote Cache and/or RBE services.

This cache implementation used Caffeine's Soft Values cache which should
be used with predictable maximum cache size.

Set the default cache size to 1000 instead of unlimited(0).
Adjust doc to note that default might not be the most optimal value.

Closes bazelbuild#14959.

PiperOrigin-RevId: 432917086
(cherry picked from commit b1bf9d6)
Wyverald pushed a commit that referenced this pull request Mar 7, 2022
The implementation of Merkle Tree Cache maintains an in-process map
which cache the Input merkle tree's nodes to save traversal time when
Bazel have to interact with Remote Cache and/or RBE services.

This cache implementation used Caffeine's Soft Values cache which should
be used with predictable maximum cache size.

Set the default cache size to 1000 instead of unlimited(0).
Adjust doc to note that default might not be the most optimal value.

Closes #14959.

PiperOrigin-RevId: 432917086
(cherry picked from commit b1bf9d6)

Co-authored-by: Son Luong Ngoc <sluongng@gmail.com>
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