[SERVER-4243] If there is a pending write due to an fsync lock, all reads are blocked Created: 10/Nov/11  Updated: 11/Jul/16  Resolved: 03/Nov/15

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 2.0.1
Fix Version/s: 2.2.0

Type: Bug Priority: Minor - P4
Reporter: Dan Pasette Assignee: Dwight Merriman
Resolution: Fixed Votes: 3
Labels: None
Environment:

64bit Ubuntu 11.04 + gcc 4.5.2


Issue Links:
Duplicate
is duplicated by SERVER-4281 isMaster command hangs if db is fsync... Closed
Related
is related to SERVER-2278 A locked mongod can't access a new da... Closed
is related to SERVER-4277 Creating new shell while fsync locked... Closed
is related to SERVER-1423 reads often aren't possible while in ... Closed
Operating System: Linux
Participants:

 Description   

By locking the database and issuing a single write, all readers are starved. No read operations can go through.

Because of this, a new shell will start but cannot be used – it must be doing some read-lock requiring operation. Ostensibly, this is due to the shell attempting to read but being unable to do so due to the waiting write starving any reader attempt.

Issuing "mongo --eval 'db.fsyncUnlock()'" will unlock the database, allow writes through, and unfreeze the shell.



 Comments   
Comment by auto (Inactive) [ 15/Nov/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Stop fsync-lock from blocking out reads. SERVER-4243
Branch: master
https://github.com/mongodb/mongo/commit/6c88cf0b68e8dbec9920125fcdae4bb114be2c59

Comment by auto (Inactive) [ 15/Nov/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Test that reads don't get blocked by writes when fsync-locked. SERVER-4243
Branch: master
https://github.com/mongodb/mongo/commit/ab709c21922572429f31b78a74c661e64ff84270

Comment by auto (Inactive) [ 15/Nov/11 ]

Author:

{u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Revert "Stop fsync-lock from blocking out reads. SERVER-4243"

This reverts commit 6c88cf0b68e8dbec9920125fcdae4bb114be2c59.
Branch: master
https://github.com/mongodb/mongo/commit/dd8703183c65511765dce1dbf14d9027a166f2ea

Comment by auto (Inactive) [ 18/Dec/11 ]

Author:

{u'login': u'astaple', u'name': u'Aaron', u'email': u'aaron@10gen.com'}

Message: SERVER-4243 temporarily remove fsync2 test from parallel suite
Branch: master
https://github.com/mongodb/mongo/commit/3c7e80456d38cb759133c2c3e955b531f4c625ea

Comment by auto (Inactive) [ 22/May/12 ]

Author:

{u'login': u'dwight', u'name': u'Dwight', u'email': u'dwight@10gen.com'}

Message: SERVER-4243 allow reading on secondaries with fsyncLock mode is enabled. previously oplog application would cause blocking. the solution is a bit hackish and eventually when this is 100% fixed, meaning it even works on primaries, this can go away
Branch: master
https://github.com/mongodb/mongo/commit/73aa870d129bd7d51de946b91c16cc056aaacbc7

Comment by auto (Inactive) [ 01/Jun/12 ]

Author:

{u'login': u'singhsiddharth', u'name': u'Siddharth Singh', u'email': u'singhsiddharth@gmail.com'}

Message: SERVER-4243 Allow reading on secondaries+fsyncLock

Allow reading on secondaries with fsyncLock mode enabled.
Previously oplog application would cause blocking.
Branch: master
https://github.com/mongodb/mongo/commit/e1aa2fd708382e48a6e01ce46b988fb0d8abec07

Comment by auto (Inactive) [ 07/Jun/12 ]

Author:

{u'login': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-4243 prevent write lock in network rs thread from blocking readers during fsync
Branch: master
https://github.com/mongodb/mongo/commit/5e41dd2b7bde5cfb48e9e90817aa76348d08b14c

Generated at Sun Sep 24 05:28:36 UTC 2017 using JIRA 7.2.10#72012-sha1:2651463a07e52d81c0fcf01da710ca333fcb42bc.