diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-06-01 11:13:57 -0400 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-06-19 15:22:19 -0400 |
commit | 4f223657341875370044df8992ac693a13b3a9a8 (patch) | |
tree | 161cd8b555be9e6c4b3ad51e5ceca5152e16d9f4 | |
parent | 1f9f74c540e36d6edff36b5ae04c7132d2e65c41 (diff) | |
download | mongo-4f223657341875370044df8992ac693a13b3a9a8.tar.gz |
SERVER-34159: Redact MigrationDestinationManager messages
(cherry picked from commit e66789f3296c8e2a8503da0b7c774d149056df59)
-rw-r--r-- | src/mongo/db/s/migration_destination_manager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 781ccf1fccc..8dae501c57e 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -486,7 +486,7 @@ void MigrationDestinationManager::_migrateThread(BSONObj min, { stdx::lock_guard<stdx::mutex> sl(_mutex); _state = FAIL; - _errmsg = exceptionToStatus().toString(); + _errmsg = redact(exceptionToStatus().toString()); } error() << "migrate failed: " << redact(exceptionToStatus()) << migrateLog; @@ -1011,9 +1011,9 @@ bool MigrationDestinationManager::_applyMigrateOp(OperationContext* txn, BSONObj localDoc; if (willOverrideLocalId( txn, ns, min, max, shardKeyPattern, cx.db(), updatedDoc, &localDoc)) { - string errMsg = str::stream() << "cannot migrate chunk, local document " << localDoc - << " has same _id as reloaded remote document " - << updatedDoc; + string errMsg = str::stream() + << "cannot migrate chunk, local document " << redact(localDoc) + << " has same _id as reloaded remote document " << redact(updatedDoc); warning() << errMsg; @@ -1046,8 +1046,8 @@ bool MigrationDestinationManager::_flushPendingWrites(OperationContext* txn, return false; } - log() << "migrate commit succeeded flushing to secondaries for '" << ns << "' " << min << " -> " - << max << migrateLog; + log() << "migrate commit succeeded flushing to secondaries for '" << ns << "' " << redact(min) + << " -> " << redact(max) << migrateLog; return true; } @@ -1069,9 +1069,9 @@ Status MigrationDestinationManager::_notePending(OperationContext* txn, return {ErrorCodes::StaleShardVersion, str::stream() << "could not note chunk " << "[" - << min + << redact(min) << "," - << max + << redact(max) << ")" << " as pending because the epoch for " << nss.ns() |