-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: make SlaveDB stay in WaitDBSync state instead of sink into Error State if rsync init failed #2667
Merged
AlexStocks
merged 3 commits into
OpenAtomFoundation:unstable
from
cheniujh:new_full_sync_state
Jun 3, 2024
Merged
fix: make SlaveDB stay in WaitDBSync state instead of sink into Error State if rsync init failed #2667
AlexStocks
merged 3 commits into
OpenAtomFoundation:unstable
from
cheniujh:new_full_sync_state
Jun 3, 2024
Conversation
This file contains 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
… meta from master timeout) to ensure the slave DB will continue to retry,instead of sinking into Error state
baixin01
reviewed
May 29, 2024
baixin01
reviewed
May 29, 2024
wangshao1
approved these changes
Jun 3, 2024
AlexStocks
approved these changes
Jun 3, 2024
baixin01
reviewed
Jun 3, 2024
baixin01
approved these changes
Jun 3, 2024
Merged
chejinge
pushed a commit
that referenced
this pull request
Jul 31, 2024
… State if rsync init failed (#2667) * make pika Slave DB stay in WaitDBSync state if rsync init failed(Pull meta from master timeout) to ensure the slave DB will continue to retry,instead of sinking into Error state * add MaxRetryCount --------- Co-authored-by: cjh <1271435567@qq.com>
Merged
cheniujh
added a commit
to cheniujh/pika
that referenced
this pull request
Sep 24, 2024
… State if rsync init failed (OpenAtomFoundation#2667) * make pika Slave DB stay in WaitDBSync state if rsync init failed(Pull meta from master timeout) to ensure the slave DB will continue to retry,instead of sinking into Error state * add MaxRetryCount --------- Co-authored-by: cjh <1271435567@qq.com>
cheniujh
added a commit
to cheniujh/pika
that referenced
this pull request
Sep 24, 2024
… State if rsync init failed (OpenAtomFoundation#2667) * make pika Slave DB stay in WaitDBSync state if rsync init failed(Pull meta from master timeout) to ensure the slave DB will continue to retry,instead of sinking into Error state * add MaxRetryCount --------- Co-authored-by: cjh <1271435567@qq.com>
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.
此PR修复了Issue #2664
引发 Issue #2664 的原因:
测试中还跑出过另外一个问题
此PR是如何修复上述问题的:
This PR fixes Issue #2664
Causes of Issue #2664:
Another issue observed during testing:
g_pika_server->SetForceFullSync(true)
is called once. This causes all DBs to enterTryDBSync
state instead ofTryConnect
when the SlaveDB receives a MetaSync Resp (if the master-slave TCP connection is disconnected, the Slave side will send a MetaSync request, and the Master will reply with MetaSync Resp), forcing all DBs to initiate a full synchronization, which is evidently inappropriate. (Due to the tight coupling with the handling of Issue SlaveDB will sink into Error state and never retry if the bgsave operation in master end takes more than 10 seconds at the begining of full sync stage #2664, no separate Issue and PR were created for this.)How this PR fixes the issues:
bgsave
task does not complete within 10 seconds), the SlaveDB will stay inWaitDBSync
state and continue to retry fetching metaInfo, instead of entering the Error state.g_pika_server->SetForceFullSync(true)
in the error handling path of rsync init failure.