MCPcopy Create free account
hub / github.com/apple/foundationdb / apply

Method apply

fdbserver/ApplyMetadataMutation.cpp:1212–1273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1210
1211public:
1212 void apply() {
1213 for (auto const& m : mutations) {
1214 if (toCommit) {
1215 toCommit->addTransactionInfo(spanContext);
1216 }
1217
1218 if (m.type == MutationRef::SetValue && isSystemKey(m.param1)) {
1219 checkSetKeyServersPrefix(m);
1220 checkSetServerKeysPrefix(m);
1221 checkSetCheckpointKeys(m);
1222 checkSetServerTagsPrefix(m);
1223 checkSetStorageCachePrefix(m);
1224 checkSetCacheKeysPrefix(m);
1225 checkSetConfigKeys(m);
1226 checkSetServerListPrefix(m);
1227 checkSetChangeFeedPrefix(m);
1228 checkSetTSSMappingKeys(m);
1229 checkSetTSSQuarantineKeys(m);
1230 checkSetApplyMutationsEndRange(m);
1231 checkSetApplyMutationsKeyVersionMapRange(m);
1232 checkSetLogRangesRange(m);
1233 checkSetGlobalKeys(m);
1234 checkSetWriteRecoverKey(m);
1235 checkSetMinRequiredCommitVersionKey(m);
1236 checkSetVersionEpochKey(m);
1237 checkSetTenantMapPrefix(m);
1238 checkSetMetaclusterRegistration(m);
1239 checkSetOtherKeys(m);
1240 } else if (m.type == MutationRef::ClearRange && isSystemKey(m.param2)) {
1241 KeyRangeRef range(m.param1, m.param2);
1242
1243 checkClearKeyServerKeys(range);
1244 checkClearConfigKeys(m, range);
1245 checkClearServerListKeys(range);
1246 checkClearTagLocalityListKeys(range);
1247 checkClearServerTagKeys(m, range);
1248 checkClearServerTagHistoryKeys(range);
1249 checkClearApplyMutationsEndRange(m, range);
1250 checkClearApplyMutationKeyVersionMapRange(m, range);
1251 checkClearLogRangesRange(range);
1252 checkClearTssMappingKeys(m, range);
1253 checkClearTssQuarantineKeys(m, range);
1254 checkClearVersionEpochKeys(m, range);
1255 checkClearTenantMapPrefix(range);
1256 checkClearMetaclusterRegistration(range);
1257 checkClearMiscRangeKeys(range);
1258 }
1259 }
1260
1261 for (KeyRangeRef& range : tssServerListToRemove) {
1262 txnStateStore->clear(range);
1263 }
1264
1265 for (auto& tssPair : tssMappingToAdd) {
1266 // read tss server list from txn state store and add it to tss mapping
1267 StorageServerInterface tssi =
1268 decodeServerListValue(txnStateStore->readValue(serverListKeyFor(tssPair.second)).get().get());
1269 (*tssMapping)[tssPair.first] = tssi;

Callers 1

applyMetadataMutationsFunction · 0.45

Calls 7

isSystemKeyFunction · 0.85
decodeServerListValueFunction · 0.85
serverListKeyForFunction · 0.85
addTransactionInfoMethod · 0.80
clearMethod · 0.65
getMethod · 0.65
readValueMethod · 0.45

Tested by

no test coverage detected