Open
Conversation
amorton
requested changes
Jan 27, 2025
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
src/main/java/io/stargate/sgv2/jsonapi/service/cqldriver/CqlRetryPolicy.java
Outdated
Show resolved
Hide resolved
amorton
requested changes
Feb 13, 2025
Contributor
amorton
left a comment
There was a problem hiding this comment.
The code is ok to merge, but we still need to understand what the router is doing
so some tweaks but we need to confirm what the router is doing next week
| import com.datastax.oss.driver.api.core.context.DriverContext; | ||
| import com.datastax.oss.driver.api.core.retry.RetryDecision; | ||
|
|
||
| /** |
|
|
||
| RetryDecision retryDecision = | ||
| (retryCount < MAX_RETRIES && received >= blockFor && !dataPresent) | ||
| ? RetryDecision.RETRY_SAME |
Contributor
There was a problem hiding this comment.
nit: can this do the same calling the subclass to get the retry same ? and the write timeout below
| int retryCount) { | ||
|
|
||
| final RetryDecision retryDecision = | ||
| (retryCount < MAX_RETRIES && (writeType == WriteType.CAS || writeType == WriteType.SIMPLE)) |
| public RetryVerdict onErrorResponseVerdict( | ||
| @NonNull Request request, @NonNull CoordinatorException error, int retryCount) { | ||
|
|
||
| // Issue1830: CASWriteUnknownException and TruncateException have been included in the default |
Contributor
There was a problem hiding this comment.
nit, include link to the GH issue
|
|
||
| @Override | ||
| @Deprecated | ||
| public RetryDecision onReadTimeout( |
Contributor
There was a problem hiding this comment.
i get why, but the Unsupported error feels a little dangerous. OK to leave but please dble check all the new methods have been implemented. Because they have default the compiler will not pickup if we miss one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
BaseCqlRetryPolicyis for HCD and Cassandra;AstraCqlRetryPolicyis for AstraonWriteTimeoutVerdictandonErrorResponseVerdictand change the retry times to 3.Which issue(s) this PR fixes:
Fixes #1830
Checklist