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

Improve request graph cache reading #9721

Merged
merged 7 commits into from
May 17, 2024
Merged

Improve request graph cache reading #9721

merged 7 commits into from
May 17, 2024

Conversation

benjervis
Copy link
Contributor

One of the issues that we think might be causing the cache related bugs we've been getting is that when reading the nodes files back in, the read and deserialise logic just reads in however many there happen to be on disk.

Since it's possible for two different instances of a RequestTracker to have the same cache key, and that one may contain fewer nodes, a number of incorrect nodes are being read in when we hydrate from cache.

To work around this, we're adding some information to the cache to store how many node chunk files there are and how many nodes are in each one. This avoids overreading from cache, and means we can validate that the right number of nodes are being read in (since the last file in a cache won't be full).

Also to allow for testing of multiple chunks, we've made the number of nodes that go in each blob a property on the class, so it can be overridden in testing (without having to create 2**16 test nodes to force a second chunk).

@mattcompiles mattcompiles requested a review from a team May 17, 2024 00:56
@benjervis benjervis added this pull request to the merge queue May 17, 2024
Merged via the queue into v2 with commit 25d010a May 17, 2024
16 of 17 checks passed
@benjervis benjervis deleted the add-request-graph-id branch May 17, 2024 02:26
@Nikola-3 Nikola-3 self-requested a review May 17, 2024 03:35
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.

None yet

2 participants