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

FileAllocator seems to take database lock. Is this needed?

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Storage
    • Environment:
      centos 5.6, 64bit, use 3 node replica, non sharding

      When FileAllocator worked, the whole of database seems to be locked during allocating physical data file.
      The following log was written.

      [FileAllocator] done allocating datafile /data/mongo/data/hoge1.5, size: 2047MB, took 21.081 secs

      On this time, read/write operation was queued and timed out.
      To avoid request timeout, we tried pre-preallocation by the following procedure.

      1. creating database and collection at mongo console.
      2. creating ".n" files and filling with zero.
      3. creating large collection and confirm that FileAllocator did not create files and no request timeout occurred.

      That is worked fine.
      If possible, make FileAllocator free from locking.

            Assignee:
            Unassigned Unassigned
            Reporter:
            hitoshi.asai@gmo-media.jp Hitoshi Asai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: