-
Notifications
You must be signed in to change notification settings - Fork 34
tla/storage: initial implementation [doubled buckets problem investigation] #616
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
Draft
Serpentian
wants to merge
6
commits into
tarantool:master
Choose a base branch
from
Serpentian:vshard-storage-tla-plus-spec
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
tla/storage: initial implementation [doubled buckets problem investigation] #616
Serpentian
wants to merge
6
commits into
tarantool:master
from
Serpentian:vshard-storage-tla-plus-spec
Conversation
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
Collaborator
Author
|
Doubled buckets after master switch Traces of DoubledBucketsSmallTest.tla
Traces of MasterDoubledTest.tla
Doubled buckets after stray TCP Traces of StrayTCPDoubledTest
Traces of DoubledBucketsTest.tla
|
Collaborator
|
Man, this is impressive 😨. Genius idea to use TLA for this 🔥! |
11e601a to
5aecb0e
Compare
Run the tests with:
```sh
JAVA_OPTS="-DTLA-Library=../../src" tlc
DoubledBucketsSmallTest.tla -config DoubledBucketsSmallTest.cfg
-workers 6 -continue -checkpoint 10
```
DoubledBucketsSmallTest reliably reproduces the doubled bucket problem,
which is related to master change. DoubledBucketsTest requires
constraints to become useful.
NO_DOC=tla
NO_TEST=tla
This commit implements first part of RFC for doubled buckets: syncing of replication after making a bucket `SENDING`, this protects us from the doubled bucket after master switch situation, and consequently, fixes the MasterDoubledTest and DoubledBucketsSmall tests, which reproduce that issue. Part of tarantool#576 NO_DOC=tla NO_TEST=tla
This commit prohibits any recovery or rebalancer related stuff on the masters, which have not yet synced with the replicaset after becoming master. Part of tarantool#214 NO_DOC=tla NO_TEST=tla
This commit prepares vshard bucket rebalancing algorithm to be resistant for the tarantool#214 issue. It introduces the persistent bucket generation, which is incremented on every `SENDING` status. Part of tarantool#214 NO_DOC=tla NO_TEST=tla
This commit should resolve the tarantool#214 issue. Works as follows: Recovery uses that generation in order to distinguish, which bucket is more recent, if it cannot find a bucket on the sender node. So, firstly, the node goes to the sender, if there's a bucket with any state and greater generation, local one is `GARBAGE`, we don't care about the status here. If bucket generation is equal to the local one, we use the old logic, if the bucket is missing from remote node, then fullscan all masters of the cluster. When all of the nodes replied, if there exists higher generation, the local is `GARBAGE`, `ACTIVE` otherwise. Part of tarantool#214 NO_DOC=tla NO_TEST=tla
This is the test, I'm going to execute on VM for week. Let's try finding the doubled buckets cases. NO_DOC=tla NO_TEST=tla
5aecb0e to
e7ad7ef
Compare
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.
The PR is here in order to have a place, where I can show, how changes from RFC make the situation better and in order to investigate traces of doubled buckets
Run the tests with:
JAVA_OPTS="-DTLA-Library=../../src" tlc DoubledBucketsSmallTest.tla -config DoubledBucketsSmallTest.cfg -workers 6TODO: refactor network reorder and drop to use storage states
TODO: ctest integration