Skip to content

Retry Swift container cleanup after stale listings - #1206

Open
2748109647 wants to merge 1 commit into
gaul:masterfrom
2748109647:fix/1202-swift-container-delete-retry
Open

2748109647 wants to merge 1 commit into
gaul:masterfrom
2748109647:fix/1202-swift-container-delete-retry

Conversation

@2748109647

Copy link
Copy Markdown

Fixes #1202.

OpenStack Swift can acknowledge a write before its container listing reflects the object. The default BlobStore.deleteContainer clears one listing pass and then deletes the container; if a late listing update lands between those steps, Swift returns BucketNotEmpty and teardown fails.

This adds a Swift-only override that retries the full clear-and-delete operation after BucketNotEmpty, with six bounded attempts and exponential backoff (100 ms through 1.6 s; 3.1 s total wait). Other S3 errors are propagated immediately, and interruption restores the interrupt flag and propagates the conflict.

Validation:

  • mvn -B -ntp clean '-Dtest=OpenStackSwiftContainerDeleteRetryTest,OpenStackSwiftBlobStoreTest' test — passed on Temurin 25.0.4.1; 5 tests passed, 0 failures/errors/skips.
  • git diff --check — passed.

The retry behavior is covered with unit tests plus the existing Swift BlobStore tests. This does not reproduce the SAIO eventual-listing race in a live Swift integration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swift lane: teardown flakes with BucketNotEmpty from eventually consistent container listings

1 participant