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

grpc: object upload issues found by java retry conformance tests #574

Closed
BenWhitehead opened this issue Nov 14, 2023 · 0 comments · Fixed by #573
Closed

grpc: object upload issues found by java retry conformance tests #574

BenWhitehead opened this issue Nov 14, 2023 · 0 comments · Fixed by #573
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@BenWhitehead
Copy link
Contributor

While updating the java retry conformance suite to also run for transport: GRPC I ran into two oddities in the testbench retry_test integration with grpc.

storage.object.create instructions do not apply to StartResumableWrite

Java treats all resumable upload PUTs as idempotent. Because the instruction isn't being processed until WriteObject, java still retries. This is inconsistent with JSONs handling, which does apply instructions to starting a resumable upload.

WriteObject does not finalize a resumable session sometimes

When testbench receives a WriteObjectRequest with finish_write: true without any checksummed_data it incorrectly response with an incremental response rather than the resources.

  • >>> message sent
  • <<< message received
>>> {
  upload_id: "ef1d103dc03cc220587514ab957cb56e3d9e80af394af3b5d05f8ba97602a94f"
  checksummed_data {
    content: "AAAAAAAAAAAAAAAAAAAA<snip (262144)>"
  }
}
<<< {
  persisted_size: 262144
}
## resumable session left open for further appends

## EOF signaled in app, finalize resumable session
>>> {
  upload_id: "ef1d103dc03cc220587514ab957cb56e3d9e80af394af3b5d05f8ba97602a94f"
  write_offset: 262144
  finish_write: true
}
<<< {
  persisted_size: 262144
}

The checksummed_data in WriteObjectRequest is in the oneof data declaration. Because it is declared in the oneof it is implicitly optional and need to be present in the message.

AIP-146 touches on this briefly

Because the individual fields in the oneof have different keys, a developer can programmatically determine which (if any) of the fields is populated.

Testbench will need to be updated to account for this.

@BenWhitehead BenWhitehead added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants