]> git.openstreetmap.org Git - chef.git/commitdiff
Finish compressed file before syncing it
authorTom Hughes <tom@compton.nu>
Wed, 7 Sep 2016 10:12:17 +0000 (11:12 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 7 Sep 2016 10:12:17 +0000 (11:12 +0100)
cookbooks/planet/files/default/replication-bin/replicate-changesets

index 8132fa61bdf9fd3a31ade1f946f82cb5294230d2..97cd8a09da2bf6dffd2a551dab1a417d9468fa48 100644 (file)
@@ -196,7 +196,7 @@ class Replicator
         FileUtils.mkdir_p(File.dirname(data_file))
         Zlib::GzipWriter.open(tmp_data) do |fh|
           fh.write(changeset_dump(open_changesets))
-          fh.fdatasync
+          fh.finish.fdatasync
         end
         @state["sequence"] = sequence
         File.open(tmp_state, "w") do |fh|