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

Make S3 anti-contention delay configurable #101245

Merged

Conversation

DaveCTurner
Copy link
Contributor

The anti-contention delay in the S3 repository's compare-and-exchange
operation is hard-coded at 1 second today, but sometimes we encounter a
repository that needs much longer to perform a compare-and-exchange
operation when under contention. With this commit we make the
anti-contention delay configurable.

The anti-contention delay in the S3 repository's compare-and-exchange
operation is hard-coded at 1 second today, but sometimes we encounter a
repository that needs much longer to perform a compare-and-exchange
operation when under contention. With this commit we make the
anti-contention delay configurable.
@DaveCTurner DaveCTurner added >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.11.1 v8.12.0 labels Oct 23, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team label Oct 23, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @DaveCTurner, I've created a changelog YAML for you.

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

LGTM

I don't quite understand how compare-and-exchange is implemented with multipart uploads. But the setting change itself looks fine to me.

Comment on lines +63 to +68
private static final Setting<TimeValue> REPOSITORY_S3_CAS_ANTI_CONTENTION_DELAY_SETTING = Setting.timeSetting(
"repository_s3.compare_and_exchange.anti_contention_delay",
TimeValue.timeValueSeconds(1),
TimeValue.timeValueMillis(1),
TimeValue.timeValueHours(24),
Setting.Property.NodeScope
Copy link
Member

Choose a reason for hiding this comment

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

Do we want this setting to be dynamic updatable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think no (at least not for now).

@DaveCTurner DaveCTurner added the auto-backport-and-merge Automatically create backport pull requests and merge when ready label Oct 24, 2023
@DaveCTurner DaveCTurner merged commit 2757e30 into elastic:main Oct 24, 2023
13 checks passed
@DaveCTurner DaveCTurner deleted the 2023/10/23/anti-contention-delay-setting branch October 24, 2023 07:13
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Oct 24, 2023
The anti-contention delay in the S3 repository's compare-and-exchange
operation is hard-coded at 1 second today, but sometimes we encounter a
repository that needs much longer to perform a compare-and-exchange
operation when under contention. With this commit we make the
anti-contention delay configurable.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.11

elasticsearchmachine pushed a commit that referenced this pull request Oct 24, 2023
The anti-contention delay in the S3 repository's compare-and-exchange
operation is hard-coded at 1 second today, but sometimes we encounter a
repository that needs much longer to perform a compare-and-exchange
operation when under contention. With this commit we make the
anti-contention delay configurable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready >bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Meta label for distributed team v8.11.1 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants