From 42eebf1c68849b1367a8e87757f8019732058c50 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Fri, 22 May 2015 16:27:48 +0200 Subject: Fsync logorder in merge Closes CATLFISH-46 --- tools/merge.py | 6 ++++++ 1 file changed, 6 insertions(+) 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" -- cgit v1.1