Move the Promise<QuorumVersion> before the Future vector to be destroyed after the vector

This commit is contained in:
Chaoguang Lin 2022-03-22 14:54:45 -07:00 committed by Lukas Joswiak
parent 6390d93efd
commit af9deeabc2
1 changed files with 3 additions and 3 deletions

View File

@ -40,6 +40,9 @@ struct QuorumVersion {
};
class GetCommittedVersionQuorum {
// Set to the <secondToLastCommitted, lastCommitted> versions a quorum of
// ConfigNodes agree on, otherwise unset.
Promise<QuorumVersion> quorumVersion;
std::vector<Future<Void>> actors;
std::vector<ConfigFollowerInterface> cfis;
std::map<Version, std::vector<ConfigFollowerInterface>> replies;
@ -52,9 +55,6 @@ class GetCommittedVersionQuorum {
Version lastSeenVersion;
size_t totalRepliesReceived{ 0 };
size_t maxAgreement{ 0 };
// Set to the <secondToLastCommitted, lastCommitted> versions a quorum of
// ConfigNodes agree on, otherwise unset.
Promise<QuorumVersion> quorumVersion;
// Stores the largest committed version out of all responses.
Version largestCommitted{ 0 };