| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…-quantum aligned write calls Despite GCS only allowing incremental updates to a resumable session at 256KiB byte boundaries, we have observed an extremely rare case of an incremental write being non-quantum aligned. The change in this PR makes ApiaryUnbufferedWritableByteChannel graceful to this possibility, and will only set the finalization header when close is invoked. If a write is not quantum aligned, it will either: 1) not be consumed at all, at which point write can be called again with the still enqueued bytes 2) partially consumed, with the position of the provided ByteBuffers updated to reflect how much of their bytes were consumed, matching up with the number of bytes actually consumed returned from `write()` Add new integration test to intentionally perform non-quantum aligned `write()` calls to ApiaryUnbufferedWritableByteChannel. Separate change to gRPC affected code path to come in a later PR. b/330550326
| * committed. | ||
| */ | ||
| @Test | ||
| public void scenario9() throws Exception { |
There was a problem hiding this comment.
This test would verify that GCS ack'ing fewer bytes than were sent was correctly categorized as a failure scenario, however as we are now gracefully handling the partial write case. We no longer need this test for failure categorization.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Despite GCS only allowing incremental updates to a resumable session at 256KiB byte boundaries, we have observed an extremely rare case (<0.000001%) of an incremental write being non-quantum aligned. The change in this PR makes ApiaryUnbufferedWritableByteChannel graceful to this possibility, and will only set the finalization header when close is invoked.
If a write is not quantum aligned, it will either: 1) not be consumed at all, at which point write can be called again with the still enqueued bytes 2) partially consumed, with the position of the provided ByteBuffers updated to reflect how much of their bytes were consumed, matching up with the number of bytes actually consumed returned from write()
Add new integration test to intentionally perform non-quantum aligned write() calls to ApiaryUnbufferedWritableByteChannel.
Separate change to gRPC affected code path to come in a later PR.
b/330550326