-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Bigtable] Documented defaults timeout values in the EnhancedBigtableStubSettings #5126
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
Conversation
Updated timeouts in `EnhnaceDBigtableStubSettings` as `BigtableClientSettings` settings methods are deprecated
|
@igorbernstein2 Please have a look at this change. |
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
|
@kennethlowery8190, please remove the approval. This pr needs more work and I don’t want it accidentally merged |
- Listed Description for straming and non-streaming operation. - Tried explaning RPC vs Total timeout - Tried explaining retryDelayMultiplier. - Added default values on each setting operation's javadoc. - Added bulkMutateRowsSettings description.
Codecov Report
@@ Coverage Diff @@
## master #5126 +/- ##
============================================
+ Coverage 50.38% 50.87% +0.48%
- Complexity 23736 24223 +487
============================================
Files 2248 2271 +23
Lines 226471 230204 +3733
Branches 24954 25007 +53
============================================
+ Hits 114109 117113 +3004
- Misses 103770 104452 +682
- Partials 8592 8639 +47
Continue to review full report at Codecov.
|
|
@igorbernstein2 Please have another round of review. I have added below points in the last commit.
|
|
@igorbernstein2 or @kolea2, can you PTAL |
igorbernstein2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some suggestions for rewording the values. Let me know what you think
| * <li>Each operation setting accepts RPC and total time out. Here, RPC timeouts are for each | ||
| * attempt to get the result whereas total timeout applies to the operation timeout. | ||
| * <li>RetryDelayMultiplier controls the change in retry delay. After initial attempt, subsequent | ||
| * attempts are calculated by multiplying the retry delay of the previous call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels out of place. The first 3 bullet points describe the values of the settings, while new 3 points are describing concepts. Also, what are you referring to by this settings? Also, it's weird that the explanation for RetryDelayMultiplier is 3 bullet points away from the Retries bullet point.
I think it would be better to link users to read the docs for RetrySettings for a description of the concepts and focus on the values in these docs. (see below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with your new suggested explanation, User will get the idea about these Retries and RPC timeouts so I have removed these explanations from the Class level Javadoc.
Please let me know if we want to add any details here.
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
| * Code#UNAVAILABLE} failure code. | ||
| * | ||
| * <p>RetryDelay starts with 100ms or 0.1 seconds, which multiplies with 1.3 times on every | ||
| * reattempt till a max retry timeout value of 60 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop 0.1 seconds. Also, this isnt a timeout. Maybe reword to:
The RetryDelay between failed attempts starts with 100ms and exponentially increases by a factor of 1.3 until 60 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed suggestion, I have updated these settings with the same.
| * <p>RetryDelay starts with 100ms or 0.1 seconds, which multiplies with 1.3 times on every | ||
| * reattempt till a max retry timeout value of 60 seconds. | ||
| * | ||
| * <p>RPC timeout is 20 seconds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should combine the 2 timeouts docs and call out that the RPC timeout means wait timeout:
The default read timeout for each row in a response stream is 20 seconds. And the timeout to read the entire stream is 1 hour.
| * | ||
| * <p>RPC timeout is 20 seconds. | ||
| * | ||
| * <p>Total timeout for this operation is 600 seconds or 10 mins. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the streaming example I think you should combine the timeouts:
The default timeout for each attempt is 20 seconds and the timeout for the entire operation across all of the attempts is 10 mins.
| * | ||
| * <p>This is idempotent and streaming operation. | ||
| * | ||
| * <p>The idle timeout is configured via {@code ServerStreamingCallSettings#getIdleTimeout}. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe nest these in a list? Also as opposed to duplicating the docs in RetrySettings and ServerStreamingSettings, just link out to them. Also I think it would better to link directly to the setters
Maybe something this?
<p>Default settings:
<ul>
<li>{@link ServerStreamingCallSettings.Builder#setIdleTimeout Default idle timeout} is set to 1 hour
<li>{@link ServerStreamingCallSettings.Builder#setRetryableCodes Error codes} are: {@link Code#DEADLINE_EXCEEDED} and {@link Code#UNAVAILABLE}
<li>RetryDelay {@link RetrySettings.Builder#setInitialRetryDelay starts} at 100ms and {@link RetrySettings.Builder#setRetryDelayMultiplier increases exponentially} by 1.3 until a maximum of ....
|
@igorbernstein2 I tried to address feedback comments, Please take a look. |
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
...table/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
Outdated
Show resolved
Hide resolved
|
Just a couple minor nits, but LGTM! |
|
@igorbernstein2 Have addressed your feedback, Please have another look. |
igorbernstein2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
|
Look like a spanner test is failing |
Fixes #2992
Updated default timeouts for all the operations in
EnhnaceDBigtableStubSettingsasBigtableClientSettingssettings were deprecated.