Add fix to conditionally set global config history
This commit is contained in:
parent
aa0014ab6e
commit
1c60653c2a
|
@ -28,6 +28,7 @@ set(FDBCLIENT_SRCS
|
|||
FDBOptions.h
|
||||
FDBTypes.h
|
||||
FileBackupAgent.actor.cpp
|
||||
GlobalConfig.h
|
||||
GlobalConfig.actor.h
|
||||
GlobalConfig.actor.cpp
|
||||
GrvProxyInterface.h
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "fdbclient/DatabaseContext.h"
|
||||
#include "fdbclient/GlobalConfig.actor.h"
|
||||
#include "fdbclient/SpecialKeySpace.actor.h"
|
||||
#include "fdbclient/SystemData.h"
|
||||
|
@ -134,6 +135,10 @@ ACTOR Future<Void> GlobalConfig::updater(GlobalConfig* self, Reference<AsyncVar<
|
|||
try {
|
||||
wait(dbInfo->onChange());
|
||||
|
||||
if (dbInfo->get().id.second() != 123456789) {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto& history = dbInfo->get().history;
|
||||
if (history.size() == 0 || (self->lastUpdate < history[0].version && self->lastUpdate != 0)) {
|
||||
// This process missed too many global configuration
|
||||
|
|
|
@ -3233,10 +3233,10 @@ ACTOR Future<Void> monitorGlobalConfig(ClusterControllerData::DBInfo* db) {
|
|||
historyCommitVersion = bigEndian64(historyCommitVersion);
|
||||
vh.version = historyCommitVersion;
|
||||
|
||||
clientInfo.history.push_back(vh);
|
||||
clientInfo.history.push_back(std::move(vh));
|
||||
}
|
||||
|
||||
clientInfo.id = deterministicRandom()->randomUniqueID();
|
||||
clientInfo.id = UID(deterministicRandom()->randomUniqueID().first(), 123456789);
|
||||
db->clientInfo->set(clientInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "boost/lexical_cast.hpp"
|
||||
#include "boost/algorithm/string.hpp"
|
||||
|
||||
#include "fdbclient/GlobalConfig.actor.h"
|
||||
#include "fdbclient/ManagementAPI.actor.h"
|
||||
#include "fdbclient/NativeAPI.actor.h"
|
||||
#include "fdbclient/ReadYourWrites.h"
|
||||
|
|
Loading…
Reference in New Issue