summaryrefslogtreecommitdiff
path: root/tools/merge.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-05-22 16:27:48 +0200
committerMagnus Ahltorp <map@kth.se>2015-05-22 16:27:48 +0200
commit42eebf1c68849b1367a8e87757f8019732058c50 (patch)
tree873e5540717c91779026d5c5821c5f6928d08677 /tools/merge.py
parentb3cf7d7737f1fb32bff222e184ae62a3b44f736f (diff)
Fsync logorder in merge
Closes CATLFISH-46
Diffstat (limited to 'tools/merge.py')
-rwxr-xr-xtools/merge.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/merge.py b/tools/merge.py
index b426039..8766491 100755
--- a/tools/merge.py
+++ b/tools/merge.py
@@ -73,6 +73,11 @@ def add_to_logorder(key):
f.write(base64.b16encode(key) + "\n")
f.close()
+def fsync_logorder():
+ f = open(logorderfile, "a")
+ os.fsync(f.fileno())
+ f.close()
+
def get_new_entries(node, baseurl):
try:
result = http_request(baseurl + "ct/storage/fetchnewentries", key=own_key, verifynode=node, publickeydir=paths["publickeys"])
@@ -228,6 +233,7 @@ for storagenode in storagenodes:
logorder.append(hash)
certsinlog.add(hash)
added_entries += 1
+fsync_logorder()
timing_point(timing, "add entries")
print "added", added_entries, "entries"