chore: EXC-2087: Use HeapBytes in caches#6445
Merged
berestovskyy merged 4 commits intomasterfrom Sep 2, 2025
Merged
Conversation
26ba794 to
4ab7648
Compare
This was referenced Aug 28, 2025
DeterministicHeapBytes in cachesDeterministicHeapBytes in caches
kpop-dfinity
approved these changes
Aug 28, 2025
Contributor
kpop-dfinity
left a comment
There was a problem hiding this comment.
Consensus owned changes LGTM
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 28, 2025
As an example, the escaping is fixed in this PR: #6445
908fcd9 to
b876978
Compare
mraszyk
reviewed
Aug 29, 2025
This PR derives the `DeterministicHeapBytes` trait for all types used in the LRU, Query, and Compilation caches. The `MemoryDiskBytes` trait is renamed to `DiskBytes`. The PR also includes a future-proof guard for Query Cache data structures (see `total_bytes_future_proof_guard()`).
1. Rename crates from `ic-deterministic-heap-bytes` to `ic-heap-bytes`. 2. Add `HeapBytes` trait and derive. 3. Use `HeapBytes` in `QueryCache` and `CompilationCache`. 4. Simplify traits to just one function: `[deterministic_]heap_bytes()`. 5. Add more tests.
basvandijk
approved these changes
Sep 1, 2025
1d8a15f to
32afa14
Compare
alin-at-dfinity
approved these changes
Sep 2, 2025
DeterministicHeapBytes in cachesHeapBytes in caches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR derives the
HeapBytestrait for Query, and Compilation caches. TheMemoryDiskBytestrait is renamed toDiskBytes.The PR also includes a future-proof guard for Query Cache data structures (see
total_bytes_future_proof_guard()).