From 3cc5d484a5cdfc587a8a1901480396e9ed61390b Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Fri, 27 Sep 2019 18:33:56 -0700 Subject: [PATCH] the include and exclude commands do not need to set the moveKeysLockOwnerKey, which will kill the data distribution algorithm --- fdbclient/ManagementAPI.actor.cpp | 5 ----- fdbserver/Ratekeeper.actor.cpp | 2 +- fdbserver/masterserver.actor.cpp | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/fdbclient/ManagementAPI.actor.cpp b/fdbclient/ManagementAPI.actor.cpp index 1b031aedd0..0e762d911c 100644 --- a/fdbclient/ManagementAPI.actor.cpp +++ b/fdbclient/ManagementAPI.actor.cpp @@ -1208,8 +1208,6 @@ ACTOR Future excludeServers( Database cx, vector servers tr.setOption( FDBTransactionOptions::USE_PROVISIONAL_PROXIES ); tr.addReadConflictRange( singleKeyRange(excludedServersVersionKey) ); //To conflict with parallel includeServers - tr.addReadConflictRange( singleKeyRange(moveKeysLockOwnerKey) ); - tr.set( moveKeysLockOwnerKey, versionKey ); tr.set( excludedServersVersionKey, excludeVersionKey ); for(auto& s : servers) tr.set( encodeExcludedServersKey(s), StringRef() ); @@ -1240,9 +1238,6 @@ ACTOR Future includeServers( Database cx, vector servers // includeServers might be used in an emergency transaction, so make sure it is retry-self-conflicting and CAUSAL_WRITE_RISKY tr.setOption( FDBTransactionOptions::CAUSAL_WRITE_RISKY ); tr.addReadConflictRange( singleKeyRange(excludedServersVersionKey) ); - tr.addReadConflictRange( singleKeyRange(moveKeysLockOwnerKey) ); - - tr.set( moveKeysLockOwnerKey, versionKey ); tr.set( excludedServersVersionKey, excludeVersionKey ); for(auto& s : servers ) { diff --git a/fdbserver/Ratekeeper.actor.cpp b/fdbserver/Ratekeeper.actor.cpp index d649508cdb..c8ebcc847a 100644 --- a/fdbserver/Ratekeeper.actor.cpp +++ b/fdbserver/Ratekeeper.actor.cpp @@ -697,7 +697,7 @@ ACTOR Future configurationMonitor(Reference> dbInfo conf->fromKeyValues( (VectorRef) results ); - state Future watchFuture = tr.watch(moveKeysLockOwnerKey); + state Future watchFuture = tr.watch(moveKeysLockOwnerKey) || tr.watch(excludedServersVersionKey); wait( tr.commit() ); wait( watchFuture ); break; diff --git a/fdbserver/masterserver.actor.cpp b/fdbserver/masterserver.actor.cpp index aac7785498..14afc53216 100644 --- a/fdbserver/masterserver.actor.cpp +++ b/fdbserver/masterserver.actor.cpp @@ -1213,7 +1213,7 @@ ACTOR Future configurationMonitor( Reference self ) { self->registrationTrigger.trigger(); } - state Future watchFuture = tr.watch(moveKeysLockOwnerKey); + state Future watchFuture = tr.watch(moveKeysLockOwnerKey) || tr.watch(excludedServersVersionKey); wait(tr.commit()); wait(watchFuture); break;