summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_util.cpp
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2020-08-04 11:17:28 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-08 12:31:19 +0000
commit8da5e4febe5b7d4a055e08f49489f6b22b900abb (patch)
tree61accd14ee4d9d91370227c9ff0a678613363e5a /src/mongo/db/s/migration_util.cpp
parentee34a14ce8426b4a38615c09aaac4e4964d529e6 (diff)
downloadmongo-8da5e4febe5b7d4a055e08f49489f6b22b900abb.tar.gz
SERVER-49192 Persist the VectorClock for configTime and topologyTime causal consistency
Diffstat (limited to 'src/mongo/db/s/migration_util.cpp')
-rw-r--r--src/mongo/db/s/migration_util.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp
index 6d240a3a23b..79db4463d51 100644
--- a/src/mongo/db/s/migration_util.cpp
+++ b/src/mongo/db/s/migration_util.cpp
@@ -57,6 +57,7 @@
#include "mongo/db/s/sharding_runtime_d_params_gen.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/sharding_statistics.h"
+#include "mongo/db/vector_clock.h"
#include "mongo/db/write_concern.h"
#include "mongo/executor/task_executor_pool.h"
#include "mongo/executor/thread_pool_task_executor.h"
@@ -736,6 +737,11 @@ void markAsReadyRangeDeletionTaskLocally(OperationContext* opCtx, const UUID& mi
}
void deleteMigrationCoordinatorDocumentLocally(OperationContext* opCtx, const UUID& migrationId) {
+ // TODO SERVER-49921 Optimize wait for vector clock persistence
+ // Persist the vector clock in order to ensure casual consistency on configTime
+ auto vectorClock = VectorClock::get(opCtx->getServiceContext());
+ vectorClock->persist().get(opCtx);
+
PersistentTaskStore<MigrationCoordinatorDocument> store(
NamespaceString::kMigrationCoordinatorsNamespace);
store.remove(opCtx,