summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-11-25 01:04:12 +0100
committerLinus Nordberg <linus@nordu.net>2016-11-25 01:04:12 +0100
commite253cf7a2e1465e4e57f8d42d87492855167f4a1 (patch)
tree5d9f3705497c2fcfa798adb34350f2622844126f
parent49b6e85963ef55fb6cfa1876fe825730f95658bc (diff)
Unbreak the ordinary tests.pmerge2
-rwxr-xr-xtools/merge_fetch.py1
-rw-r--r--tools/mergetools.py6
2 files changed, 6 insertions, 1 deletions
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)