Skip to content

Read in absence of viable writer #238

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

Merged
merged 2 commits into from
Apr 27, 2017

Conversation

lutovich
Copy link
Contributor

Previously driver did not allow reads and writes when received routing table did not contains both routers, readers and writers. This was inconsistent with Causal Cluster which allows reads when leader is absent. Leader might be unavailable for a long time (when there is a DC failure, etc.) so it makes sense to allow clients to perform read activity.

This PR makes driver accept routing table with no writers and allow clients to perform read operations when writers are not available. It might be problematic when there is a cluster partition and one partition contains majority. For this case special care must be taken so driver does not get stuck talking only to the smaller partition which only knows about itself. This is done on best effort basis - driver tries to contact seed router if previously accepted routing table did not contain writes.

Based on #237

Previously driver did not allow reads and writes when received routing
table did not contains both routers, readers and writers. This was
inconsistent with Causal Cluster which allows reads when leader is absent.
Leader might be unavailable for a long time (when there is a DC failure, etc.)
so it makes sense to allow clients to perform read activity.

This commit makes driver accept routing table with no writers and allow
clients to perform read operations when writers are not available. It
might be problematic when there is a cluster partition and one partition
contains majority. For this case special care must be taken so driver
does not get stuck talking only to the smaller partition which only
knows about itself. This is done on best effort basis - driver tries
to contact seed router if previously accepted routing table did not
contain writes.
@lutovich lutovich force-pushed the 1.3-read-when-no-writer branch from 367a2b3 to cf43106 Compare April 27, 2017 16:29
@lutovich lutovich merged commit fa2ce28 into neo4j:1.3 Apr 27, 2017
@lutovich lutovich deleted the 1.3-read-when-no-writer branch April 27, 2017 17:11
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