summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp
diff options
context:
space:
mode:
authorThomas Schubert <thomas.schubert@mongodb.com>2016-08-24 16:01:07 -0400
committerThomas Schubert <thomas.schubert@mongodb.com>2016-09-02 16:38:54 -0400
commit81bc570b41f59f8a7101df13892272bae6da9857 (patch)
treec3bf61103fbf399ca1f165afd94296da8132d31b /src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp
parentfba18b66c7140178fd5b4efdd42d51fb9e0fc0ae (diff)
downloadmongo-81bc570b41f59f8a7101df13892272bae6da9857.tar.gz
SERVER-24991 log redaction for bson, client, auth, catalog
Diffstat (limited to 'src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp')
-rw-r--r--src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp b/src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp
index 3589cc309f8..945b1239abe 100644
--- a/src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp
+++ b/src/mongo/s/catalog/replset/replset_dist_lock_manager.cpp
@@ -299,29 +299,22 @@ StatusWith<DistLockHandle> ReplSetDistLockManager::lockWithSessionID(OperationCo
const BSONObj& data = customTimeout.getData();
lockExpiration = Milliseconds(data["timeoutMs"].numberInt());
}
- // REDACT: can this whyMessage ever have PII?
LOG(1) << "trying to acquire new distributed lock for " << name
<< " ( lock timeout : " << durationCount<Milliseconds>(lockExpiration)
<< " ms, ping interval : " << durationCount<Milliseconds>(_pingInterval)
<< " ms, process : " << _processID << " )"
- << " with lockSessionID: " << lockSessionID
- << ", why: " << redact(whyMessage.toString());
+ << " with lockSessionID: " << lockSessionID << ", why: " << whyMessage.toString();
- auto lockResult = _catalog->grabLock(txn,
- name,
- lockSessionID,
- who,
- _processID,
- Date_t::now(),
- redact(whyMessage.toString()));
+ auto lockResult = _catalog->grabLock(
+ txn, name, lockSessionID, who, _processID, Date_t::now(), whyMessage.toString());
auto status = lockResult.getStatus();
if (status.isOK()) {
// Lock is acquired since findAndModify was able to successfully modify
// the lock document.
- log() << "distributed lock '" << name << "' acquired for '"
- << redact(whyMessage.toString()) << "', ts : " << lockSessionID;
+ log() << "distributed lock '" << name << "' acquired for '" << whyMessage.toString()
+ << "', ts : " << lockSessionID;
return lockSessionID;
}
@@ -412,7 +405,7 @@ StatusWith<DistLockHandle> ReplSetDistLockManager::lockWithSessionID(OperationCo
// Periodically message for debugging reasons
if (msgTimer.seconds() > 10) {
LOG(0) << "waited " << timer.seconds() << "s for distributed lock " << name << " for "
- << redact(whyMessage.toString());
+ << whyMessage.toString();
msgTimer.reset();
}