db.fsyncLock() does not stop writes to FTDC / diagnostic.data files

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Admin
    • None
    • ALL
    • Hide

      Sequence of steps to be followed to reproduce this is mentioned below. Execute these steps on a running mongodb server.
      1. First use db.fsyncLock() to fsync the data and take a lock.
      2. Then use python util Shutil.copytree() to copy the entire data directory to another location.
      3. Then I unlock using db.fsyncUnlock().

      This is not reproducible every time. This problem is coming intermittently (once in 20 times)

      Show
      Sequence of steps to be followed to reproduce this is mentioned below. Execute these steps on a running mongodb server. 1. First use db.fsyncLock() to fsync the data and take a lock. 2. Then use python util Shutil.copytree() to copy the entire data directory to another location. 3. Then I unlock using db.fsyncUnlock(). This is not reproducible every time. This problem is coming intermittently (once in 20 times)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As documented here, I expect Mongodb's db.fsyncLock() to ensure the data files do not change for Mongodb instance using WiredTiger storage engine.

      We are using mongodb version 3.4 and low level file backup strategy via file copy (Python Shutil.copytree).

      The problem I am facing intermittently is that sometimes my backup fails with error such as
      <mongo_data_dir>/diagnostic.data/metrics.interim is unavailable to be copied to the destination path.

      Sequence of steps which I am following :
      1. First I use the atomic operation db.fsyncLock() to fsync the data and take a lock.
      2. Then I use a low level file backup strategy via files copy. Exactly I am using a python util Shutil.copytree() to copy the entire data directory to another location.
      3. Then I unlock using db.fsyncUnlock().

      The problem I am facing is in second step. This problem is coming intermittently (once in 20 times)

            Assignee:
            Mark Agarunov (Inactive)
            Reporter:
            NIKHIL
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: