-
Notifications
You must be signed in to change notification settings - Fork 220
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
pdpb: add replicate_mode #584
Conversation
Signed-off-by: disksing <[email protected]>
proto/replicate_mode.proto
Outdated
message ReplicateStatus { | ||
enum Mode { | ||
MAJORITY = 0; // the standard mode. Replicate logs to majority peer. | ||
MS_AUTOSYNC = 1; // master-slave mode. Replicate logs among 2 DCs. |
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.
How about "PS_AUTO"? "PS" stands for primary and secondary. Or "Active-Active".
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.
seems PS is harder for reader to guess its meaning. I'm thinking maybe just AUTOSYNC
proto/replicate_mode.proto
Outdated
ASYNC = 1; // raft logs need to sync to majority peers | ||
SYNC_RECOVER = 2; // switching from ASYNC to SYNC mode | ||
} | ||
string label = 1; // the key of the label that used for distinguish different DC. |
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.
How about "label_key"?
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.
good idea
proto/replicate_mode.proto
Outdated
string label = 1; // the key of the label that used for distinguish different DC. | ||
State state = 2; | ||
uint64 recover_id = 3; // Unique ID for a recovery | ||
int32 wait_sync_timeout_hint = 4; // Duration to wait before switching to SYNC by force |
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.
Should mention its unit.
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.
good idea
Signed-off-by: disksing <[email protected]>
proto/replicate_mode.proto
Outdated
} | ||
State state = 1; | ||
uint64 recover_id = 2; // Unique ID for a recovery | ||
} |
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.
Need new blank line?
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.
good idea
Signed-off-by: disksing <[email protected]>
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
package replicate_mode; | ||
|
||
// The replicate status sync from PD to TiKV. | ||
message ReplicateStatus { |
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.
Maybe we need to name it as ReplicationStatus
?
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.
I think it ok. You can send a PR.
Signed-off-by: disksing <[email protected]> Signed-off-by: 5kbpers <[email protected]>
* cdc: add regions field for reducing message of resolved ts Signed-off-by: 5kbpers <[email protected]> * pdpb: add replicate_mode (#584) Signed-off-by: disksing <[email protected]> Signed-off-by: 5kbpers <[email protected]> * replicate_mode: change recover-id to state-id (#594) Signed-off-by: disksing <[email protected]> * replicate: add unknown region state (#595) Signed-off-by: disksing <[email protected]> * *: update name and script (#597) Signed-off-by: Jay Lee <[email protected]> Signed-off-by: 5kbpers <[email protected]> * support batch coprocessor (#586) Add batch coprocessor function for TiFlash Engine. Signed-off-by: 5kbpers <[email protected]> * pd: add UpdateServiceGCSafePoint method (#603) * pd: add UpdateServiceGCSafePoint method Signed-off-by: Shafreeck Sea <[email protected]> Signed-off-by: 5kbpers <[email protected]> * Add end_key_exclude field to SstMeta and distinguish restoring of RawKv (#581) * Add end_key_exclusive field to SSTMeta * Add is_raw_kv field to download request * Revert changes of unrelated go files Signed-off-by: MyonKeminta <[email protected]> * build Co-authored-by: MyonKeminta <[email protected]> Signed-off-by: 5kbpers <[email protected]> * Revert "cdc: add regions field for reducing message of resolved ts" This reverts commit c382b16. Signed-off-by: 5kbpers <[email protected]> Co-authored-by: disksing <[email protected]> Co-authored-by: Jay <[email protected]> Co-authored-by: Han Fei <[email protected]> Co-authored-by: Shafreeck Sea <[email protected]> Co-authored-by: MyonKeminta <[email protected]> Co-authored-by: MyonKeminta <[email protected]>
Signed-off-by: disksing <[email protected]>
Signed-off-by: disksing [email protected]
See PD issue tikv/pd#2272 for detail.