setDDMode should set moveKeysLockWriteKey
After takeMoveKeysLock notes down the owner and the moveKeysLockWriteKey value, it monitors the above two in pollMoveKeysLock and checks if anything is changed, but setDDMode was not setting the moveKeysLockWriteKey and so a sequence like disable, enable and disable would not really disable DD.
This commit is contained in:
parent
a26980682d
commit
0962641540
|
@ -1403,11 +1403,12 @@ ACTOR Future<int> setDDMode( Database cx, int mode ) {
|
|||
rd >> oldMode;
|
||||
}
|
||||
}
|
||||
if (!mode) {
|
||||
BinaryWriter wrMyOwner(Unversioned());
|
||||
wrMyOwner << dataDistributionModeLock;
|
||||
tr.set( moveKeysLockOwnerKey, wrMyOwner.toValue() );
|
||||
}
|
||||
BinaryWriter wrMyOwner(Unversioned());
|
||||
wrMyOwner << dataDistributionModeLock;
|
||||
tr.set( moveKeysLockOwnerKey, wrMyOwner.toValue() );
|
||||
BinaryWriter wrLastWrite(Unversioned());
|
||||
wrLastWrite << deterministicRandom()->randomUniqueID();
|
||||
tr.set( moveKeysLockWriteKey, wrLastWrite.toValue() );
|
||||
|
||||
tr.set( dataDistributionModeKey, wr.toValue() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue