summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2012-11-26 17:51:06 -0500
committerDan Pasette <dan@10gen.com>2013-01-08 01:16:02 -0500
commitc28a406b1f3b68a983d40df8503989e39449d8ac (patch)
tree26ca1e019f5d2e50e4c22d9e204aa947fb510186
parentc5f1c1474b182143690867760253b0c99ab1fc5b (diff)
downloadmongo-c28a406b1f3b68a983d40df8503989e39449d8ac.tar.gz
SERVER-6167 reduce distlock verbosity, add logging on lock_try
Conflicts: src/mongo/client/distlock.cpp
-rw-r--r--src/mongo/client/distlock.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/client/distlock.cpp b/src/mongo/client/distlock.cpp
index 7345a692168..5a209c96161 100644
--- a/src/mongo/client/distlock.cpp
+++ b/src/mongo/client/distlock.cpp
@@ -319,9 +319,9 @@ namespace mongo {
_lockTimeout( lockTimeout == 0 ? LOCK_TIMEOUT : lockTimeout ), _maxClockSkew( _lockTimeout / LOCK_SKEW_FACTOR ), _maxNetSkew( _maxClockSkew ), _lockPing( _maxClockSkew ),
_mutex( "DistributedLock" )
{
- log( logLvl - 1 ) << "created new distributed lock for " << name << " on " << conn
- << " ( lock timeout : " << _lockTimeout
- << ", ping interval : " << _lockPing << ", process : " << asProcess << " )" << endl;
+ LOG( logLvl ) << "created new distributed lock for " << name << " on " << conn
+ << " ( lock timeout : " << _lockTimeout
+ << ", ping interval : " << _lockPing << ", process : " << asProcess << " )" << endl;
}
@@ -492,6 +492,11 @@ namespace mongo {
// This should always be true, if not, we are using the lock incorrectly.
verify( _name != "" );
+ LOG( logLvl ) << "trying to acquire new distributed lock for " << _name << " on " << _conn
+ << " ( lock timeout : " << _lockTimeout
+ << ", ping interval : " << _lockPing << ", process : " << _processId << " )"
+ << endl;
+
// write to dummy if 'other' is null
BSONObj dummyOther;
if ( other == NULL )