-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Chunk FindMissingBlobsRequest appropriately #20708
Conversation
I haven't forgotten about this @tgolsson. I just haven't made time to test this. I'll attempt to get to this no later than end of next week (4/14/2024). |
@tgolsson it worked! |
694efe3
to
b7d8edc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
src/rust/engine/remote_provider/remote_provider_reapi/src/byte_store.rs
Outdated
Show resolved
Hide resolved
src/rust/engine/remote_provider/remote_provider_reapi/src/byte_store.rs
Outdated
Show resolved
Hide resolved
src/rust/engine/remote_provider/remote_provider_reapi/src/byte_store.rs
Outdated
Show resolved
Hide resolved
provider | ||
.list_missing_digests(&mut test_data.into_iter()) | ||
.await, | ||
Ok(HashSet::new()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test. I think there's a few plausible mistakes that we could introduce in future that won't be caught:
- only sending each unique digest once, thus invalidating this test (i.e. if we do the
HashSet
idea, thelist_missing_digests
will be working with just one digest and thus only send one request) - skipping the second+ request (either not sending them at all, or not including the results in the final aggregation)
- Not sure about this one: if we break this in another way and start sending >4MiB requests, does the
StubCAS
reject the requests (i.e. does this test fail without the fix)?
I think we can address each of them:
- check
assert_eq!(cas.request_count(RequestType::CASFindMissingBlobs), 2)
so that the test starts failing if that core assumption changes - add two digests that is missing, within each "chunk" (e.g. one at the start and one at the end)
- add request size enforcement to
StubCAS
if not already there (this might cause other tests to fail, so we might want it to be optional until we resolve them)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add request size enforcement to StubCAS if not already there (this might cause other tests to fail, so we might want it to be optional until we resolve them
If I remove my fix, the existing test fails.
assertion `left == right` failed
left: Err("OutOfRange: \"Error, decoded message length too large: found 7000000 bytes, the limit is: 4194304 bytes\"")
right: Ok({})
src/rust/engine/remote_provider/remote_provider_reapi/src/byte_store.rs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've just branched for 2.22, so merging this pull request now will come out in 2.23, please move the release notes updates to docs/notes/2.23.x.md
. Thank you!
We've just branched for 2.23, so merging this pull request now will come out in 2.24, please move the release notes updates to |
I think from the comments this is >90% of the way there and fixes a bug. @tgolsson would you mind dusting it off? |
(We're now up to |
0890fb9
to
bb84987
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, thanks for revisiting it!
(I've edited the Github magic auto-closing incantation of "Fixes #20674" into the PR description, but feel free to revise if that's not correct.) |
I was unable to cherry-pick this PR; the milestone seems to be missing. @tgolsson: Please add the milestone to the PR and re-run the Auto Cherry-Picker job using the "Run workflow" button. |
Fixes #20674