Skip to content

Implement the overload retry policy for commands that are read/write retryable - #4

Draft
stIncMale wants to merge 8 commits into
sleepAsyncfrom
overloadRetryPolicyForCommandsThatAreRWRetryable
Draft

Implement the overload retry policy for commands that are read/write retryable#4
stIncMale wants to merge 8 commits into
sleepAsyncfrom
overloadRetryPolicyForCommandsThatAreRWRetryable

Conversation

@stIncMale

@stIncMale stIncMale commented Jul 10, 2026

Copy link
Copy Markdown
Owner

JAVA-6248 - of the relevant spec changes, client-backpressure.md was implemented for commands that are read/write retryable, but the transactions.md changes were not implemented and will be implemented in another PR for the same ticket JAVA-6248.
JAVA-6055 - conducted the audit as per the TODO-BACKPRESSURE in the ticket. The audited logic is in SpecRetryPolicy.decideWriteProspectiveFailedResult. We are good, no code changes are needed.

@stIncMale stIncMale self-assigned this Jul 10, 2026
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch 6 times, most recently from d1c63c3 to 5afb443 Compare July 15, 2026 20:35
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch 4 times, most recently from 9010353 to 64aed0a Compare July 30, 2026 15:33
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch 3 times, most recently from a5ffef2 to 21dc696 Compare July 31, 2026 20:25
Also add `UnifiedClientBackpressureTest` and enable prose tests

JAVA-6248
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch 5 times, most recently from fd9bd93 to 881fbc9 Compare August 7, 2026 21:00
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch 2 times, most recently from 62fe561 to edbc934 Compare August 7, 2026 23:51
- Removed `ClientSessionImpl.applyMajorityWriteConcernToTransactionOptions`, which was used in `withTransaction`. This is not the place for this logic, and it furthermore was useless, as `CommitTransactionOperation.getRetryCommandModifier` does the same, and more.
- Made `ClientSessionImpl` and `ClientSessionPublisherImpl` compute `alreadyCommitted` the same way.
- Made `ClientSessionImpl.commitTransaction` and `ClientSessionPublisherImpl.commitTransaction` handle `transactionState` and `commitInProgress` the same way.
- Passed `OperationContext` instead of `TimeoutContext` to `AbortTransactionOperation.getRetryCommandModifier`

JAVA-6248
…Operation.getRetryCommandModifier` adding `withW("majority")` when not needed

JAVA-6248
@stIncMale
stIncMale force-pushed the overloadRetryPolicyForCommandsThatAreRWRetryable branch from edbc934 to adf7aec Compare August 8, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant