Skip to content

Conversation

@danieldoglas
Copy link
Contributor

Details

This PR changes the logic in _updateSyncPeer to choose the leader as a sync peer only if no other nodes are available. The change should help reduce processing pressure on the leader node.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/455682

Tests


Internal Testing Reminder: when changing bedrock, please compile auth against your new changes

@danieldoglas danieldoglas self-assigned this Dec 24, 2024
@danieldoglas danieldoglas requested review from cead22, iwiznia and tylerkaraszewski and removed request for cead22 and iwiznia December 24, 2024 15:48
iwiznia
iwiznia previously approved these changes Dec 24, 2024
peer->setCommit(message.calcU64("CommitCount"), message["Hash"]);


// We check the commit difference with 12,500 commits behind because that
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change supposed to be in this PR? Seems kind of unrelated to the other change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this PR should be on hold til the other one is merged

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the "other one"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was the other one: #2039

I changed the base branch to that PR so you can see only the necessary changes.

@cead22
Copy link
Contributor

cead22 commented Dec 24, 2024

Change looks good. Happy to approve when the other PR is merged and this one only has the diff for this change

@danieldoglas danieldoglas changed the base branch from main to dsilva_blockingCommandPortWhenNotCaughtUp December 24, 2024 19:03
@danieldoglas
Copy link
Contributor Author

danieldoglas commented Dec 24, 2024

Changed the base PR so it only shows the needed changes

Base automatically changed from dsilva_blockingCommandPortWhenNotCaughtUp to main December 26, 2024 18:48
@tylerkaraszewski tylerkaraszewski dismissed iwiznia’s stale review December 26, 2024 18:48

The base branch was changed.

@danieldoglas
Copy link
Contributor Author

@cead22 @iwiznia @iwiznia all yours to review.

iwiznia
iwiznia previously approved these changes Dec 27, 2024
@iwiznia
Copy link
Contributor

iwiznia commented Dec 27, 2024

Approved (though not showing for me in the right pane), anyway leaving it for @cead22 and @tylerkaraszewski to review too

cead22
cead22 previously approved these changes Dec 30, 2024
@cead22 cead22 merged commit 6367890 into main Dec 31, 2024
1 check passed
@cead22 cead22 deleted the dsilva_chooseSyncPeerOtherThanLeader branch December 31, 2024 18:27
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.

5 participants