Skip to content

Commit 2f363ef

Browse files
authored
fix: update default sample row key attempt timeout to 5 min (#1827)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/java-bigtable/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://togithub.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent c5b5ea4 commit 2f363ef

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ public ServerStreamingCallSettings<Query, Row> readRowsSettings() {
387387
* starts} at 10ms and {@link RetrySettings.Builder#setRetryDelayMultiplier increases
388388
* exponentially} by a factor of 2 until a {@link RetrySettings.Builder#setMaxRetryDelay
389389
* maximum of} 1 minute.
390-
* <li>The default timeout for {@link RetrySettings.Builder#setMaxRpcTimeout each attempt} is 20
391-
* seconds and the timeout for the {@link RetrySettings.Builder#setTotalTimeout entire
390+
* <li>The default timeout for {@link RetrySettings.Builder#setMaxRpcTimeout each attempt} is 5
391+
* minutes and the timeout for the {@link RetrySettings.Builder#setTotalTimeout entire
392392
* operation} across all of the attempts is 10 mins.
393393
* </ul>
394394
*/
@@ -659,7 +659,12 @@ private Builder() {
659659
sampleRowKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
660660
sampleRowKeysSettings
661661
.setRetryableCodes(IDEMPOTENT_RETRY_CODES)
662-
.setRetrySettings(IDEMPOTENT_RETRY_SETTINGS);
662+
.setRetrySettings(
663+
IDEMPOTENT_RETRY_SETTINGS
664+
.toBuilder()
665+
.setInitialRpcTimeout(Duration.ofMinutes(5))
666+
.setMaxRpcTimeout(Duration.ofMinutes(5))
667+
.build());
663668

664669
mutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
665670
copyRetrySettings(baseDefaults.mutateRowSettings(), mutateRowSettings);

0 commit comments

Comments
 (0)