-
Notifications
You must be signed in to change notification settings - Fork 556
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
Improve s3 backup store client reliability #10603
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
package io.camunda.zeebe.broker.system.configuration.backup; | ||
|
||
import io.camunda.zeebe.broker.system.configuration.ConfigurationEntry; | ||
import java.time.Duration; | ||
import java.util.Objects; | ||
|
||
public class S3BackupStoreConfig implements ConfigurationEntry { | ||
|
@@ -17,6 +18,7 @@ public class S3BackupStoreConfig implements ConfigurationEntry { | |
private String region; | ||
private String accessKey; | ||
private String secretKey; | ||
private Duration apiCallTimeout; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔧 I suggest to provide a default value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've set it to 180 seconds. If we assume that the largest file of a backup is a 128MiB segment this requires less than 1MiB/s throughput which should be reasonable. |
||
|
||
public String getBucketName() { | ||
return bucketName; | ||
|
@@ -58,13 +60,22 @@ public void setSecretKey(final String secretKey) { | |
this.secretKey = secretKey; | ||
} | ||
|
||
public Duration getApiCallTimeout() { | ||
return apiCallTimeout; | ||
} | ||
|
||
public void setApiCallTimeout(final Duration apiCallTimeout) { | ||
this.apiCallTimeout = apiCallTimeout; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = bucketName != null ? bucketName.hashCode() : 0; | ||
result = 31 * result + (endpoint != null ? endpoint.hashCode() : 0); | ||
result = 31 * result + (region != null ? region.hashCode() : 0); | ||
result = 31 * result + (accessKey != null ? accessKey.hashCode() : 0); | ||
result = 31 * result + (secretKey != null ? secretKey.hashCode() : 0); | ||
result = 31 * result + (apiCallTimeout != null ? apiCallTimeout.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
|
@@ -91,7 +102,10 @@ public boolean equals(final Object o) { | |
if (!Objects.equals(accessKey, that.accessKey)) { | ||
return false; | ||
} | ||
return Objects.equals(secretKey, that.secretKey); | ||
if (!Objects.equals(secretKey, that.secretKey)) { | ||
return false; | ||
} | ||
return Objects.equals(apiCallTimeout, that.apiCallTimeout); | ||
} | ||
|
||
@Override | ||
|
@@ -112,6 +126,9 @@ public String toString() { | |
+ ", secretKey='" | ||
+ "<redacted>" | ||
+ '\'' | ||
+ ", apiCallTimeout='" | ||
+ apiCallTimeout | ||
+ '\'' | ||
+ '}'; | ||
} | ||
} |
Check notice
Code scanning / CodeQL
Spurious Javadoc @param tags