Skip to content

Tags: AutoMQ/automq

Tags

nightly

Toggle nightly's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(s3stream): abort upload part on NoSuchUploadException to prevent …

…broker crash (#3418)

### Description
When using AutoMQ with S3-compatible storage backends, a
`NoSuchUploadException` can occur during an `UploadPart` or
`UploadPartCopy` operation (e.g., if the multipart upload has expired,
been aborted, or cleaned up by the backend).

Previously, `AwsObjectStorage.toRetryStrategyAndCause` only handled
`NoSuchUploadException` for `COMPLETE_MULTI_PART_UPLOAD` (mapping it to
`RetryStrategy.VISIBILITY_CHECK`). For `UPLOAD_PART` and
`UPLOAD_PART_COPY` operations, the exception fell through to the default
`RetryStrategy.RETRY`. This caused an infinite retry loop, ultimately
leading to a broker crash.

This PR addresses the issue by mapping `NoSuchUploadException` to
`RetryStrategy.ABORT` for both `UPLOAD_PART` and `UPLOAD_PART_COPY`
operations. Since the multipart upload ID is no longer valid, aborting
early prevents the crash loop.

Fixes #3206

### Testing Strategy
- Added new unit tests in
[AwsObjectStorageTest](file:///Users/divyanshuyadav/Downloads/automq/s3stream/src/test/java/com/automq/stream/s3/operator/AwsObjectStorageTest.java)
to verify retry strategy mapping:
- `testNoSuchUploadExceptionAbortsUploadPart` verifies `UPLOAD_PART`
maps to `RetryStrategy.ABORT`.
- `testNoSuchUploadExceptionAbortsUploadPartCopy` verifies
`UPLOAD_PART_COPY` maps to `RetryStrategy.ABORT`.
- `testNoSuchUploadExceptionVisibilityCheckForComplete` verifies
`COMPLETE_MULTI_PART_UPLOAD` still maps to
`RetryStrategy.VISIBILITY_CHECK`.
- Ran the unit tests locally:
  ```bash
./gradlew :s3stream:test --tests
"com.automq.stream.s3.operator.AwsObjectStorageTest"


### Committer Checklist (excluded from commit message)
- [x] Verify design and implementation 
- [x] Verify test coverage and CI build status
- [x] Verify documentation (including upgrade notes)

codex-autobalancer-decision-trace-query

Toggle codex-autobalancer-decision-trace-query's commit message

Verified

This tag was signed with the committer’s verified signature.
codex autobalancer decision trace query

1.6.6

Toggle 1.6.6's commit message

Verified

This tag was signed with the committer’s verified signature.
feat(release): release 1.6.6

1.6.5

Toggle 1.6.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(release): bump kafka version to 3.9.1 (#3296)

Signed-off-by: Robin Han <hanxvdovehx@gmail.com>

Verified

This tag was signed with the committer’s verified signature.

1.6.4-rc1

Toggle 1.6.4-rc1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(release): release 1.6.4-rc1 (#3195)

Signed-off-by: Robin Han <hanxvdovehx@gmail.com>

1.6.4-rc0

Toggle 1.6.4-rc0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(release): bump version to 1.6.4-rc0 (#3180)

Signed-off-by: Robin Han <hanxvdovehx@gmail.com>

1.6.3

Toggle 1.6.3's commit message

Verified

This tag was signed with the committer’s verified signature.
1.6.31.6.31.6.3