| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
When finalizing an appendable upload depending on how quickly gcs is acking bytes, we could run into a case where finish_write: true was sent before all bytes had been enqueued. Regression introduced in 2.57.0
| if (i < lastIdx && !shouldFlush) { | ||
| appended = stream.append(datum); | ||
| } else if (i == lastIdx && nextWriteShouldFinalize) { | ||
| } else if (i == lastIdx && remainingAfterPacking == 0 && nextWriteShouldFinalize) { |
There was a problem hiding this comment.
These two lines are the actual fix
Sorry, something went wrong.
| totalSentBytes, | ||
| confirmedBytes, | ||
| size | ||
| ); |
There was a problem hiding this comment.
Adding more info to the diagnostic to make it more useful in the future.
Sorry, something went wrong.
| @Rule public final TestName testName = new TestName(); | ||
|
|
||
| @Test | ||
| public void appendAndFinalizeOnlyPerformedIfAllBytesConsumed() throws IOException { |
There was a problem hiding this comment.
The new test to verify the fix
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| private static BidiStreamingCallable<BidiWriteObjectRequest, BidiWriteObjectResponse> |
There was a problem hiding this comment.
Moved into BidiUploadTestUtils.java for sharing
Sorry, something went wrong.
|
Was this caught somewhere? Is there a bug with context? |
Sorry, something went wrong.
b/445496061 |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Sync'd with Ben earlier / was discussed in biweekly.
Sorry, something went wrong.
When finalizing an appendable upload depending on how quickly gcs is acking bytes, we could run into a case where finish_write: true was sent before all bytes had been enqueued. Regression introduced in 2.57.0
| Back | FazBrowse Home | New Git URL |
When finalizing an appendable upload depending on how quickly gcs is acking bytes, we could run into a case where finish_write: true was sent before all bytes had been enqueued.
Regression introduced in 2.57.0