optimize: remove fsync when dumping rwlock data (#4052)

Fixes #3653
This commit is contained in:
Saugat Pachhai
2020-06-16 17:55:36 +03:00
committed by GitHub
parent 7c6351d039
commit 387867fbbe
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -51,9 +51,6 @@ def _edit_rwlock(lock_dir):
yield lock
with open(path, "w+") as fobj:
json.dump(lock, fobj)
# NOTE: flush and fsync to ensure that rwlock contents are saved
fobj.flush()
os.fsync(fobj.fileno())
def _infos_to_str(infos):
+1 -1
View File
@@ -449,7 +449,7 @@ def test_repro_when_new_outs_added_does_not_exist(tmp_dir, dvc):
{
"stages": {
"run-copy": {
"cmd": "python copy {} {}".format("foo", "foobar"),
"cmd": "python copy.py {} {}".format("foo", "foobar"),
"deps": ["foo"],
"outs": ["foobar", "bar"],
}