From e253cf7a2e1465e4e57f8d42d87492855167f4a1 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 25 Nov 2016 01:04:12 +0100 Subject: Unbreak the ordinary tests. --- tools/merge_fetch.py | 1 + tools/mergetools.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py index 6accca4..e00f061 100755 --- a/tools/merge_fetch.py +++ b/tools/merge_fetch.py @@ -140,6 +140,7 @@ def merge_fetch_worker(args, localconfig, storagenode, pipe): verify_entry(verifycert, entry, ehash) chainsdb.add(ehash, entry) chainsdb.commit() + chainsdb.release_lock() for ehash in chunk: pipe.send('FETCHED %s' % hexencode(ehash)) to_fetch.remove(ehash) diff --git a/tools/mergetools.py b/tools/mergetools.py index 9a4f6b2..ecad7ca 100644 --- a/tools/mergetools.py +++ b/tools/mergetools.py @@ -490,8 +490,10 @@ class FileDB: self.lockfile = flock_sh_wait(self.path + "/.lock") def lock_ex(self): self.lockfile = flock_ex_wait(self.path + "/.lock") - def commit(self): + def release_lock(self): flock_release(self.lockfile) + def commit(self): + pass class PermDB: def __init__(self, path): @@ -504,6 +506,8 @@ class PermDB: assert False # NYI def lock_ex(self): assert False # NYI + def release_lock(self): + assert False # NYI def commit(self): permdb.committree(self.permdbobj) -- cgit v1.1