Skip to content

Commit

Permalink
fix: update default sample row key attempt timeout to 5 min (#1827)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mutianf committed Jun 30, 2023
1 parent c5b5ea4 commit 2f363ef
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -387,8 +387,8 @@ public ServerStreamingCallSettings<Query, Row> readRowsSettings() {
* starts} at 10ms and {@link RetrySettings.Builder#setRetryDelayMultiplier increases
* exponentially} by a factor of 2 until a {@link RetrySettings.Builder#setMaxRetryDelay
* maximum of} 1 minute.
* <li>The default timeout for {@link RetrySettings.Builder#setMaxRpcTimeout each attempt} is 20
* seconds and the timeout for the {@link RetrySettings.Builder#setTotalTimeout entire
* <li>The default timeout for {@link RetrySettings.Builder#setMaxRpcTimeout each attempt} is 5
* minutes and the timeout for the {@link RetrySettings.Builder#setTotalTimeout entire
* operation} across all of the attempts is 10 mins.
* </ul>
*/
Expand Down Expand Up @@ -659,7 +659,12 @@ private Builder() {
sampleRowKeysSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
sampleRowKeysSettings
.setRetryableCodes(IDEMPOTENT_RETRY_CODES)
.setRetrySettings(IDEMPOTENT_RETRY_SETTINGS);
.setRetrySettings(
IDEMPOTENT_RETRY_SETTINGS
.toBuilder()
.setInitialRpcTimeout(Duration.ofMinutes(5))
.setMaxRpcTimeout(Duration.ofMinutes(5))
.build());

mutateRowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
copyRetrySettings(baseDefaults.mutateRowSettings(), mutateRowSettings);
Expand Down

0 comments on commit 2f363ef

Please sign in to comment.