-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fixed an issue in QuorumReader when quorum could not be selected even though 1 secondary and Primary are reachable and in sync #38832
Conversation
…to users/fabianm/ReadManyRequestOptions
…sQueryRequestOptions was not final.
…to users/fabianm/QuorumReaderNoQuorumSelected
…to users/fabianm/QuorumReaderNoQuorumSelected
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
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
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 for the quick fix :)
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosItemTest.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/CosmosItemTest.java
Outdated
Show resolved
Hide resolved
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
… though 1 secondary and Primary are reachable and in sync (#38832) * Added overload with CosmosReadManyRequestOptions * Fixing style errors * Update CosmosReadManyRequestOptions.java * Fixing build break * Avoiding a possibly breaking change by injecting a base class - CosmosQueryRequestOptions was not final. * Update TransientIOErrorsRetryingIteratorITest.scala * Addressing code review feedback * Added fallback to include Primary in QuorumReader when quorum could not be selected. * Update CHANGELOG.md * Update CosmosItemTest.java * Update CosmosItemTest.java
* Fixed an issue in QuorumReader when quorum could not be selected even though 1 secondary and Primary are reachable and in sync (#38832) * Added overload with CosmosReadManyRequestOptions * Fixing style errors * Update CosmosReadManyRequestOptions.java * Fixing build break * Avoiding a possibly breaking change by injecting a base class - CosmosQueryRequestOptions was not final. * Update TransientIOErrorsRetryingIteratorITest.scala * Addressing code review feedback * Added fallback to include Primary in QuorumReader when quorum could not be selected. * Update CHANGELOG.md * Update CosmosItemTest.java * Update CosmosItemTest.java * increase the version in each module * changed test to use queryOptions instead of readmany options * Update sdk/cosmos/azure-cosmos/CHANGELOG.md * updated date * Update sdk/cosmos/azure-cosmos/CHANGELOG.md --------- Co-authored-by: Fabian Meiswinkel <fabianm@microsoft.com>
Description
When
QuorumReader
(used for consistency levelsBounded Staleness
andStrong
) is not able to select a quorum because it only retrieved a response from a single Secondary. TheReadPrimaryAsync
call will fail because the replica set size is larger thanReadQuorum
. Any retry there-after should include the Primary - so, that Primary and one Secondary can build quorum - otherwise as long as only one Secondary is actually reachable we can't serve the read operations even when 1 Secondary and 1 Primary should be able to build quorum.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines