-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Admin
-
None
-
ALL
-
-
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)