diff options
author | Magnus Ahltorp <map@kth.se> | 2015-05-22 16:27:48 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2015-05-22 16:27:48 +0200 |
commit | 42eebf1c68849b1367a8e87757f8019732058c50 (patch) | |
tree | 873e5540717c91779026d5c5821c5f6928d08677 | |
parent | b3cf7d7737f1fb32bff222e184ae62a3b44f736f (diff) |
Fsync logorder in mergefsynclogorder
Closes CATLFISH-46
-rwxr-xr-x | tools/merge.py | 6 |
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" |