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 GetReadVersionReply.recentRequests to reflect a proxy's number of recent requests in the commit stats. #3377
Conversation
|
||
for (auto v : versions) { | ||
if(v.version > rep.version) { | ||
rep = v; | ||
} | ||
} | ||
rep.recentRequests = commitData->stats.getRecentRequests(); |
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.
It seems like the change is moving this line to here after the for loop. What’s the problem it fixes?
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.
It seems that I cannot configure the reviewer to review the PR. Can you help add Evan into this since I have synced with him about this offline.
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.
Have updated the PR description, thanks.
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.
Oh I see the problem.
@@ -1411,13 +1411,13 @@ ACTOR Future<GetReadVersionReply> getLiveCommittedVersion(ProxyCommitData* commi | |||
rep.version = commitData->committedVersion.get(); |
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.
won't these assignments be override in the following for() loop for the same reason?
Why don't we move them below the for loop?
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 these are fine because they are supposed to overridden when other proxy has a larger version and it's 'locked' and 'metadataVersion' is more up-to-date.
20200616-233150-apple::PR_3377-52c19f9284c793c3 correctness run passed with previous known errors. |
This is a bug I found when working on #3307 and decide to make the change a patch against 6.3.
[1] https://github.com/apple/foundationdb/blob/master/fdbserver/MasterProxyServer.actor.cpp#L2086