Skip to content
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

RFC-0078: Zone-Aware Replica Reads #136

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

avsej
Copy link
Member

@avsej avsej commented Apr 26, 2024

No description provided.

@avsej avsej changed the title initial draft Zone-Aware Replica Reads Apr 26, 2024
@avsej avsej marked this pull request as draft April 26, 2024 20:34
@avsej avsej force-pushed the 0077-zone-aware-replica-reads branch 3 times, most recently from 4ffb771 to bec99f8 Compare April 26, 2024 21:42
README.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0077-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
@avsej avsej force-pushed the 0077-zone-aware-replica-reads branch 2 times, most recently from 63f2d41 to f3c50be Compare May 20, 2024 05:05
@avsej avsej force-pushed the 0077-zone-aware-replica-reads branch from f3c50be to 7b9694f Compare May 20, 2024 05:06
@avsej avsej marked this pull request as ready for review May 20, 2024 05:29
@avsej avsej changed the title Zone-Aware Replica Reads RFC-0078: Zone-Aware Replica Reads May 20, 2024
@avsej
Copy link
Member Author

avsej commented May 29, 2024

@programmatix I've uploaded update for transactions API. It documents DocumentNotFound exception.

rfc/0078-zone-aware-replica-reads.md Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
programmatix
programmatix previously approved these changes Jun 6, 2024
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Outdated Show resolved Hide resolved
@avsej avsej requested a review from brett19 June 11, 2024 23:57
@avsej avsej requested review from chvck and DemetrisChr August 7, 2024 22:11
```
enum ReadPreference {
NO_PREFERENCE,
SELECTED_SERVER_GROUP,
Copy link
Contributor

@dnault dnault Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be PREFERRED_SERVER_GROUP (or SERVER_GROUP) to match the name of the cluster option?

```
class ClusterOptions {
// ...
ClusterOptions preferredServerGroup(String serverGroupName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a standard name for a corresponding connection string property?

If so, would that nudge us towards calling this just serverGroup which is ~50% easier to type? :-)

rfc/0078-zone-aware-replica-reads.md Show resolved Hide resolved
rfc/0078-zone-aware-replica-reads.md Show resolved Hide resolved
options()
.timeout("20ms")
.read_preference(SELECTED_SERVER_GROUP))
} catch DocumentUnretrievableException | DocumentNotFoundException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avsej for my understanding - I thought the replica methods would never raise DocumentNotFoundException?


![Selected Server Group](figures/0078-case-2-local-only.svg)

## Selected Server Group with Fallback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avsej this isn't in the ReadPreference enum below - which one is correct?

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.

7 participants