Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the ListMultipartUploads output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes #122670

Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the `ListMultipartUploads` output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes elastic#122670
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs auto-backport Automatically create backport pull requests when merged v8.19.0 v9.0.1 v9.1.0 labels Apr 22, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Apr 22, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

.setting("s3.client." + CLIENT + ".endpoint", minioFixture::getAddress)
// Skip listing of pre-existing uploads during a CAS because MinIO sometimes leaks them; also reduce the delay before proceeding
// TODO do not set these if running a MinIO version in which https://github.com/minio/minio/issues/21189 is fixed
.setting(REPOSITORY_S3_CAS_TTL_SETTING.getKey(), "-1")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting this to -1 (or 0) even without the production code changes would have had pretty much the desired effect anyway because it would make ES consider all the existing uploads as stale, letting it proceed with the CAS. The production code changes just make this behaviour a little more precise, avoiding questions of clock skew and suppressing warnings about the stale uploads etc.

Copy link
Contributor

@henningandersen henningandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@DaveCTurner DaveCTurner merged commit 2181360 into elastic:main Apr 23, 2025
17 checks passed
@DaveCTurner DaveCTurner deleted the 2025/04/22/ignore-preexisting-uploads-on-minio branch April 23, 2025 05:33
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Apr 23, 2025
Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the `ListMultipartUploads` output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes elastic#122670
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Apr 23, 2025
Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the `ListMultipartUploads` output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes elastic#122670
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x
9.0

elasticsearchmachine pushed a commit that referenced this pull request Apr 23, 2025
Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the `ListMultipartUploads` output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes #122670
elasticsearchmachine pushed a commit that referenced this pull request Apr 23, 2025
Recent versions of MinIO will sometimes leak multi-part uploads under
concurrent load, leaving them in the `ListMultipartUploads` output even
though they cannot be aborted. Today this causes repository analysis to
fail since compare-and-exchange operations will not even start if there
are any pre-existing uploads. This commit makes it possible to skip this
pre-flight check (and accept the performance consequences) by adjusting
the relevant settings.

Workaround for minio/minio#21189
Closes #122670
DaveCTurner added a commit that referenced this pull request Apr 23, 2025
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request May 25, 2025
Earlier versions of MinIO had a bug which can cause repository analysis
failures. This commit upgrades the MinIO test container version to pick
up the bug fix, and reverts the workaround implemented in elastic#127166.

Relates minio/minio#21189
DaveCTurner added a commit that referenced this pull request May 27, 2025
Earlier versions of MinIO had a bug which can cause repository analysis
failures. This commit upgrades the MinIO test container version to pick
up the bug fix, and reverts the workaround implemented in #127166.

Relates minio/minio#21189
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request May 27, 2025
Earlier versions of MinIO had a bug which can cause repository analysis
failures. This commit upgrades the MinIO test container version to pick
up the bug fix, and reverts the workaround implemented in elastic#127166.

Relates minio/minio#21189
elasticsearchmachine pushed a commit that referenced this pull request May 27, 2025
Earlier versions of MinIO had a bug which can cause repository analysis
failures. This commit upgrades the MinIO test container version to pick
up the bug fix, and reverts the workaround implemented in #127166.

Relates minio/minio#21189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Coordination Meta label for Distributed Coordination team >test Issues or PRs that are addressing/adding tests v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] MinioRepositoryAnalysisRestIT testRepositoryAnalysis failing

3 participants