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

pdpb: add replicate_mode #584

Merged
merged 3 commits into from
Mar 24, 2020
Merged

pdpb: add replicate_mode #584

merged 3 commits into from
Mar 24, 2020

Conversation

disksing
Copy link
Contributor

Signed-off-by: disksing [email protected]

See PD issue tikv/pd#2272 for detail.

@disksing disksing requested a review from BusyJay March 23, 2020 11:27
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.
Copy link
Contributor

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".

Copy link
Contributor Author

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

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about "label_key"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Should mention its unit.

Copy link
Contributor Author

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]>
nolouch
nolouch previously approved these changes Mar 24, 2020
BusyJay
BusyJay previously approved these changes Mar 24, 2020
}
State state = 1;
uint64 recover_id = 2; // Unique ID for a recovery
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Need new blank line?

Copy link
Contributor Author

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]>
@disksing disksing dismissed stale reviews from BusyJay and nolouch via 54d7cfe March 24, 2020 11:15
@disksing
Copy link
Contributor Author

PTAL @BusyJay @nolouch @HunDunDM

Copy link
Contributor

@HunDunDM HunDunDM left a comment

Choose a reason for hiding this comment

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

LGTM

@disksing disksing merged commit b8bc94d into pingcap:master Mar 24, 2020
@disksing disksing deleted the replicate-mode branch March 24, 2020 13:01
package replicate_mode;

// The replicate status sync from PD to TiKV.
message ReplicateStatus {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

5kbpers pushed a commit to 5kbpers/kvproto that referenced this pull request Aug 17, 2020
Signed-off-by: disksing <[email protected]>
Signed-off-by: 5kbpers <[email protected]>
overvenus pushed a commit that referenced this pull request Aug 18, 2020
* 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]>
daimashusheng pushed a commit to daimashusheng/kvproto that referenced this pull request Sep 2, 2021
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.

4 participants