Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4243

If there is a pending write due to an fsync lock, all reads are blocked

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.2.0
    • Component/s: Concurrency
    • Labels:
      None
    • Environment:
      64bit Ubuntu 11.04 + gcc 4.5.2
    • Operating System:
      Linux

      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.

        Issue Links

          Activity

          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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
          Hide
          auto auto (Inactive) added a comment -

          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

          Show
          auto auto (Inactive) added a comment - 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

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: