Specify system key access for a few move keys transactions
This commit is contained in:
parent
fb73e1857a
commit
1d44ef1c8e
|
@ -66,6 +66,7 @@ ACTOR Future<MoveKeysLock> takeMoveKeysLock(Database cx, UID ddId) {
|
|||
state MoveKeysLock lock;
|
||||
state UID txnId;
|
||||
tr.setOption(FDBTransactionOptions::PRIORITY_SYSTEM_IMMEDIATE);
|
||||
tr.setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
if (!g_network->isSimulated()) {
|
||||
txnId = deterministicRandom()->randomUniqueID();
|
||||
tr.debugTransaction(txnId);
|
||||
|
@ -100,6 +101,7 @@ ACTOR static Future<Void> checkMoveKeysLock(Transaction* tr,
|
|||
MoveKeysLock lock,
|
||||
const DDEnabledState* ddEnabledState,
|
||||
bool isWrite = true) {
|
||||
tr->setOption(FDBTransactionOptions::READ_SYSTEM_KEYS);
|
||||
if (!ddEnabledState->isDDEnabled()) {
|
||||
TraceEvent(SevDebug, "DDDisabledByInMemoryCheck").log();
|
||||
throw movekeys_conflict();
|
||||
|
@ -1335,6 +1337,7 @@ ACTOR Future<Void> removeKeysFromFailedServer(Database cx,
|
|||
try {
|
||||
tr.trState->taskID = TaskPriority::MoveKeys;
|
||||
tr.setOption(FDBTransactionOptions::PRIORITY_SYSTEM_IMMEDIATE);
|
||||
tr.setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
wait(checkMoveKeysLock(&tr, lock, ddEnabledState));
|
||||
TraceEvent("RemoveKeysFromFailedServerLocked")
|
||||
.detail("ServerID", serverID)
|
||||
|
|
Loading…
Reference in New Issue