mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fix assert in releaseAndWriteLock
This commit is contained in:
parent
130bfc3af7
commit
241a046b0e
13
db/client.h
13
db/client.h
@ -120,15 +120,16 @@ namespace mongo {
|
||||
|
||||
/* this unlocks, does NOT upgrade. that works for our current usage */
|
||||
inline void mongolock::releaseAndWriteLock() {
|
||||
if( !_writelock ) {
|
||||
|
||||
#if BOOST_VERSION >= 103500
|
||||
int s = dbMutex.getState();
|
||||
if( s != -1 ) {
|
||||
log() << "error: releaseAndWriteLock() s == " << s << endl;
|
||||
msgasserted( "releaseAndWriteLock: unlock_shared failed, probably recursive" );
|
||||
}
|
||||
int s = dbMutex.getState();
|
||||
if( s != -1 ) {
|
||||
log() << "error: releaseAndWriteLock() s == " << s << endl;
|
||||
msgasserted( "releaseAndWriteLock: unlock_shared failed, probably recursive" );
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !_writelock ) {
|
||||
_writelock = true;
|
||||
dbMutex.unlock_shared();
|
||||
dbMutex.lock();
|
||||
|
Loading…
Reference in New Issue
Block a user