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

View File

@ -40,6 +40,9 @@ struct QuorumVersion {
}; };
class GetCommittedVersionQuorum { 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<Future<Void>> actors;
std::vector<ConfigFollowerInterface> cfis; std::vector<ConfigFollowerInterface> cfis;
std::map<Version, std::vector<ConfigFollowerInterface>> replies; std::map<Version, std::vector<ConfigFollowerInterface>> replies;
@ -52,9 +55,6 @@ class GetCommittedVersionQuorum {
Version lastSeenVersion; Version lastSeenVersion;
size_t totalRepliesReceived{ 0 }; size_t totalRepliesReceived{ 0 };
size_t maxAgreement{ 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. // Stores the largest committed version out of all responses.
Version largestCommitted{ 0 }; Version largestCommitted{ 0 };