-
Notifications
You must be signed in to change notification settings - Fork 283
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
[master] Initiate rejoin of nodes for out of sync scenarios #2571
Conversation
15f6baf
to
0602f1b
Compare
a4b5da6
to
6109f8f
Compare
src/libLookup/Lookup.cpp
Outdated
@@ -95,6 +95,7 @@ Lookup::~Lookup() {} | |||
void Lookup::InitSync() { | |||
LOG_MARKER(); | |||
auto func = [this]() -> void { | |||
LOG_GENERAL(INFO, "###### NodeRejoin: InitSync started thread ######"); |
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.
May be remove NodeRejoin keyword since InitSync could be called or
During Rejoin but at startup as well.
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.
Done
src/libLookup/Lookup.cpp
Outdated
"Seems we have received all or few of txblocks " | ||
"previously. " | ||
"so ignoring these txblocks!"); | ||
// cv_setRejoinRecovery.notify_all(); //TODO : Check with @Sandip if we |
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 to notify right? otherwise cv_setRejoinRecovery
will wait for 180 sec in InitSync
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.
Done
src/libLookup/Lookup.cpp
Outdated
LOG_MARKER(); | ||
|
||
auto func = [this]() -> void { | ||
while (GetSyncType() != SyncType::NO_SYNC) { |
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.
code seems identical to above, maybe make a function?:>
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.
done
src/libLookup/Lookup.cpp
Outdated
@@ -2981,6 +2992,8 @@ bool Lookup::ProcessSetTxBlockFromSeed( | |||
WARNING, | |||
"The lowBlockNum is higher than highblocknum, maybe DS epoch ongoing"); | |||
cv_setTxBlockFromSeed.notify_all(); | |||
// cv_setRejoinRecovery.notify_all(); // No need to notify as we need to |
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.
what constant denotes 180 seconds? maybe mention that
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.
Removed the line as it was initially kept for my understanding
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.
plz go through comments
a12b8d9
to
16f6906
Compare
Description
This PR targets seed nodes and seedpub nodes rejoin during the following scenarios.
Backward Compatibility
Testing
Below is the testsheet link.
https://docs.google.com/spreadsheets/d/1ZtXREAGIpTyUJlzXYtatpY9ZA8k5yE7FiwUaJ7Rgaow/edit#gid=1075062091
Review Suggestion
Status
Implementation
Integration Test (Core Team)