fix: disableKey was read before options were set

This commit is contained in:
Evan Tschannen 2017-10-30 13:11:54 -07:00
parent fb89ae9f85
commit 98b4270703
1 changed files with 2 additions and 1 deletions

View File

@ -1633,11 +1633,12 @@ public:
statusText = ""; statusText = "";
state Future<Optional<Value>> fDisabled = tr->get(backupAgent->taskBucket->getDisableKey());
state UID logUid = wait(backupAgent->getLogUid(tr, tagName)); state UID logUid = wait(backupAgent->getLogUid(tr, tagName));
tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS); tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
tr->setOption(FDBTransactionOptions::LOCK_AWARE); tr->setOption(FDBTransactionOptions::LOCK_AWARE);
state Future<Optional<Value>> fDisabled = tr->get(backupAgent->taskBucket->getDisableKey());
int backupStateInt = wait(backupAgent->getStateValue(tr, logUid)); int backupStateInt = wait(backupAgent->getStateValue(tr, logUid));
state BackupAgentBase::enumState backupState = (BackupAgentBase::enumState)backupStateInt; state BackupAgentBase::enumState backupState = (BackupAgentBase::enumState)backupStateInt;