diff options
author | Enrico Golfieri <enrico.golfieri@mongodb.com> | 2023-02-22 16:06:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-22 17:22:44 +0000 |
commit | d0007e2b78f9169cc110f4a993358a3eb61e0541 (patch) | |
tree | 5b15fb63e1d5fe32f559077d35e286348895b69c | |
parent | 65f14fa9306570ba800e70e89148eda4dcb8e2d1 (diff) | |
download | mongo-d0007e2b78f9169cc110f4a993358a3eb61e0541.tar.gz |
SERVER-72179 Log an event when setting/unsetting permit migrations flag
-rw-r--r-- | src/mongo/db/s/set_allow_migrations_coordinator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/s/set_allow_migrations_coordinator.cpp b/src/mongo/db/s/set_allow_migrations_coordinator.cpp index ed1e55da18f..256cbcd6adc 100644 --- a/src/mongo/db/s/set_allow_migrations_coordinator.cpp +++ b/src/mongo/db/s/set_allow_migrations_coordinator.cpp @@ -31,6 +31,7 @@ #include "mongo/db/s/set_allow_migrations_coordinator.h" #include "mongo/db/commands.h" +#include "mongo/db/s/sharding_logging.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_collection.h" #include "mongo/s/grid.h" @@ -110,6 +111,11 @@ ExecutorFuture<void> SetAllowMigrationsCoordinator::_runImpl( Shard::RetryPolicy::kIdempotent); uassertStatusOK(response.toStatus()); + + ShardingLogging::get(opCtx)->logChange(opCtx, + "setPermitMigrations", + nss().ns(), + BSON("permitMigrations" << _allowMigrations)); }) .onError([this, anchor = shared_from_this()](const Status& status) { LOGV2_ERROR(5622700, |