Skip to content

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Mar 25, 2025

Resolves: ES-10815

@ywangd ywangd added >enhancement :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v9.1.0 labels Mar 25, 2025
@ywangd ywangd requested a review from DaveCTurner March 25, 2025 05:43
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Mar 25, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Comment on lines +176 to +180
static final Setting.AffixSetting<TimeValue> CONNECTION_MAX_IDLE_TIME_SETTING = Setting.affixKeySetting(
PREFIX,
"connection_max_idle_time",
key -> Setting.timeSetting(key, Defaults.CONNECTION_MAX_IDLE_TIME, Property.NodeScope)
);
Copy link
Member Author

Choose a reason for hiding this comment

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

I was going to update the docs for this. But was not able to find the source file anymore (asciidoc or md). Not sure whether this is a bug introduced in #123507. I asked in the es-docs channel.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

The biggest obstacle we're facing in the upgrade to AWS SDK v2 is finding equivalent behaviour (and tests) for all the existing settings. It's far from trivial, and this PR adds to that burden. Can we hold off on this change until the SDK upgrade is complete instead please?

@ywangd
Copy link
Member Author

ywangd commented Mar 25, 2025

Sure. There is no urgency for this to be completed.

@ywangd ywangd marked this pull request as draft March 26, 2025 02:06
@DaveCTurner
Copy link
Contributor

DaveCTurner commented Sep 16, 2025

The AWS SDK upgrade to v2 is now complete so I think we can carry on with this now. I believe the correct way to pass this setting into the new SDK is as follows:

diff --git a/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java
index fc18f4bc97a8..f76fe17702a3 100644
--- a/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java
+++ b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java
@@ -310,6 +310,7 @@ class S3Service extends AbstractLifecycleComponent {

         httpClientBuilder.maxConnections(clientSettings.maxConnections);
         httpClientBuilder.socketTimeout(Duration.ofMillis(clientSettings.readTimeoutMillis));
+        httpClientBuilder.connectionMaxIdleTime(...);

         Optional<ProxyConfiguration> proxyConfiguration = buildProxyConfiguration(clientSettings);
         if (proxyConfiguration.isPresent()) {

ywangd added a commit to ywangd/docs-content that referenced this pull request Sep 17, 2025
@ywangd ywangd marked this pull request as ready for review September 17, 2025 08:06
@ywangd ywangd requested a review from DaveCTurner September 17, 2025 08:06
@ywangd
Copy link
Member Author

ywangd commented Sep 17, 2025

Thanks for the prompt. I updated the PR to reflect latest changes. Also raised a doc PR elastic/docs-content#2982

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

LGTM thanks Yang

boolean addPurposeCustomQueryParameter,
String region
String region,
long connectionMaxIdleTimeMillis
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I'd slightly prefer this to be grouped next to readTimeoutMillis (here, and in the field declaration, and in .equals() and .hashcode() etc).

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, see 3f09a49

@ywangd ywangd added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Sep 17, 2025
@elasticsearchmachine elasticsearchmachine merged commit ae07ec8 into elastic:main Sep 18, 2025
34 checks passed
@ywangd ywangd deleted the ES-10815-s3-max-idle-setting branch September 18, 2025 01:09
ywangd added a commit to elastic/docs-content that referenced this pull request Sep 18, 2025
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed Coordination Meta label for Distributed Coordination team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants