]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Avoid directory renames in BackupEngine
authorAndrew Kryczka <andrewkr@fb.com>
Sat, 21 Apr 2018 00:23:34 +0000 (17:23 -0700)
committerAndrew Kryczka <andrewkr@fb.com>
Tue, 1 May 2018 00:50:24 +0000 (17:50 -0700)
commit747c85320396e5d8aa1ebdb880888fe1b4494404
treed9bc26b46d2cb71f32564d04e26e9104e864c1d0
parentf5ee207c64de55fdefc51750cdf291f59a72dccb
Avoid directory renames in BackupEngine

Summary:
We used to name private directories like "1.tmp" while BackupEngine populated them, and then rename without the ".tmp" suffix (i.e., rename "1.tmp" to "1") after all files were copied. On glusterfs, directory renames like this require operations across many hosts, and partial failures have caused operational problems.

Fortunately we don't need to rename private directories. We already have a meta-file that uses the tempfile-rename pattern to commit a backup atomically after all its files have been successfully copied. So we can copy private files directly to their final location, so now there's no directory rename.
Closes https://github.com/facebook/rocksdb/pull/3749

Differential Revision: D7705610

Pulled By: ajkr

fbshipit-source-id: fd724a28dd2bf993ce323a5f2cb7e7d6980cc346
utilities/backupable/backupable_db.cc
utilities/backupable/backupable_db_test.cc