-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
opt(predMove): hot tablet move #7703
Conversation
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.
Reviewable status: 0 of 4 files reviewed, 2 unresolved discussions (waiting on @NamanJain8)
dgraph/cmd/zero/tablet.go, line 179 at r1 (raw file):
SourceGid: srcGroup, DestGid: dstGroup, TxnTs: ids.StartId,
Rename it to ReadTs.
worker/predicate_move.go, line 97 at r1 (raw file):
return errors.Errorf("Expecting clean predicate instruction with schema key: %+v", kv) } kv.Meta = nil
Use stream_id.
if stream_id == 0, then do the clean up.
If stream_id == 1, then don't.
You can then create an enum or something to set the stream id, so it's clear to the code reader.
6193833
to
194af85
Compare
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.
Reviewable status: 0 of 4 files reviewed, 3 unresolved discussions (waiting on @NamanJain8 and @vvbalaji-dgraph)
dgraph/cmd/zero/tablet.go, line 57 at r2 (raw file):
• Zero would tell G1 to move rest of the P's data (with T1<=ts<=T2) to G2 (Endpoint: Zero → G1) • G2 acceps the data, but this time does not clean the current keys for P. • G1 should tell Zero whetjer it succeeded or failed. (Endpoint G1 → Zero)
whetjer -> whether
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.
Nice change! 💯
Currently, the writes are blocked on the tablet that is being moved. Shard movement can take a while (say 30 mins) to be moved completely. Then, its not a good idea to block the writes on that predicate.
Solution: Hot Tablet Move
TODO: Fix the issues found while working on this.
This change is