Renamed SystemDBLockWriteNow() to SystemDBWriteLockedNow() and changed definition to be more direct / clear.
This commit is contained in:
parent
dd334f1b02
commit
c57ed25987
|
@ -73,7 +73,7 @@ ACTOR Future<bool> rangeConfigCommandActor(Database cx, std::vector<StringRef> t
|
|||
}
|
||||
|
||||
DDConfiguration::RangeConfigMapSnapshot config = wait(DDConfiguration().userRangeConfig().getSnapshot(
|
||||
SystemDBLockWriteNow(cx.getReference()), allKeys.begin, allKeys.end));
|
||||
SystemDBWriteLockedNow(cx.getReference()), allKeys.begin, allKeys.end));
|
||||
fmt::print(
|
||||
"{}\n",
|
||||
json_spirit::write_string(DDConfiguration::toJSON(config, includeDefault), json_spirit::pretty_print));
|
||||
|
@ -110,7 +110,7 @@ ACTOR Future<bool> rangeConfigCommandActor(Database cx, std::vector<StringRef> t
|
|||
}
|
||||
|
||||
wait(DDConfiguration().userRangeConfig().updateRange(
|
||||
SystemDBLockWriteNow(cx.getReference()), begin, end, rangeConfig, cmd == "set"_sr));
|
||||
SystemDBWriteLockedNow(cx.getReference()), begin, end, rangeConfig, cmd == "set"_sr));
|
||||
}
|
||||
} else {
|
||||
return fail(fmt::format("Unknown command: '{}'", cmd.printable()));
|
||||
|
|
|
@ -128,8 +128,8 @@ auto SystemDB(Reference<DB> db, bool write = false, bool lockAware = false, bool
|
|||
|
||||
// SystemDB with all options true
|
||||
template <typename DB>
|
||||
auto SystemDBLockWriteNow(Reference<DB> db) {
|
||||
return SystemDB(db, true, true, true);
|
||||
auto SystemDBWriteLockedNow(Reference<DB> db) {
|
||||
return makeReference<SystemTransactionGenerator<DB>>(db, true, true, true);
|
||||
}
|
||||
|
||||
#include "flow/unactorcompiler.h"
|
||||
|
|
|
@ -443,7 +443,7 @@ ACTOR Future<Void> checkDataConsistency(Database cx,
|
|||
|
||||
state DDConfiguration::RangeConfigMapSnapshot userRangeConfig =
|
||||
wait(DDConfiguration().userRangeConfig().getSnapshot(
|
||||
SystemDBLockWriteNow(cx.getReference()), allKeys.begin, allKeys.end));
|
||||
SystemDBWriteLockedNow(cx.getReference()), allKeys.begin, allKeys.end));
|
||||
|
||||
for (; i < ranges.size(); i++) {
|
||||
state int shard = shardOrder[i];
|
||||
|
|
|
@ -245,7 +245,7 @@ class DDTxnProcessorImpl {
|
|||
if (ddLargeTeamEnabled()) {
|
||||
wait(store(*result->userRangeConfig,
|
||||
DDConfiguration().userRangeConfig().getSnapshot(
|
||||
SystemDBLockWriteNow(cx.getReference()), allKeys.begin, allKeys.end)));
|
||||
SystemDBWriteLockedNow(cx.getReference()), allKeys.begin, allKeys.end)));
|
||||
}
|
||||
state std::map<UID, Optional<Key>> server_dc;
|
||||
state std::map<std::vector<UID>, std::pair<std::vector<UID>, std::vector<UID>>> team_cache;
|
||||
|
|
|
@ -721,7 +721,7 @@ ACTOR Future<Void> dataDistribution(Reference<DataDistributor> self,
|
|||
// Start watching for changes before reading the config in init() below
|
||||
state Promise<Version> configChangeWatching;
|
||||
state Future<Void> onConfigChange =
|
||||
map(DDConfiguration().trigger.onChange(SystemDBLockWriteNow(cx.getReference()), {}, configChangeWatching),
|
||||
map(DDConfiguration().trigger.onChange(SystemDBWriteLockedNow(cx.getReference()), {}, configChangeWatching),
|
||||
[](Version v) {
|
||||
CODE_PROBE(true, "DataDistribution change detected");
|
||||
TraceEvent("DataDistributionConfigChanged").detail("ChangeVersion", v);
|
||||
|
|
Loading…
Reference in New Issue