]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Change default value of `bytes_max_delete_chunk` to 0 in NewSstFileManager() (#4092)
authorSiying Dong <siying.d@fb.com>
Wed, 4 Jul 2018 00:54:41 +0000 (17:54 -0700)
committersdong <siying.d@fb.com>
Wed, 4 Jul 2018 02:56:11 +0000 (19:56 -0700)
Summary:
Now by default, with NewSstFileManager, checkpoints may be corrupted. Disable this feature to avoid this issue.
Closes https://github.com/facebook/rocksdb/pull/4092

Differential Revision: D8729856

Pulled By: siying

fbshipit-source-id: 914c321d6eaf52d8c5981171322d85dd29088307

HISTORY.md
include/rocksdb/sst_file_manager.h

index 478293afc5616d747bd340e26e9970271d400ea9..83e0e4527562e3650258f921a8149efe5aed7c4e 100644 (file)
@@ -3,6 +3,7 @@
 ### Bug Fixes
 * Fix block-based table reader pinning blocks throughout its lifetime, causing memory usage increase.
 * Fix bug with prefix search in partition filters where a shared prefix would be ignored from the later partitions. The bug could report an eixstent key as missing. The bug could be triggered if prefix_extractor is set and partition filters is enabled.
+* Change default value of `bytes_max_delete_chunk` to 0 in NewSstFileManager() as it doesn't work well with checkpoints.
 
 ## 5.14.0 (5/16/2018)
 ### Public API Change
index 475a5d47b4c64b5c70110528b5112bcd24a75c53..d1133d871d29d0dcbd5cbb1bda68a67c57c03710 100644 (file)
@@ -98,12 +98,13 @@ class SstFileManager {
 //    DeleteScheduler immediately
 // @param bytes_max_delete_chunk: if a single file is larger than delete chunk,
 //    ftruncate the file by this size each time, rather than dropping the whole
-//    file. 0 means to always delete the whole file.
+//    file. 0 means to always delete the whole file. NOTE this options may not
+//    work well with checkpoints, which relies on file system hard links.
 extern SstFileManager* NewSstFileManager(
     Env* env, std::shared_ptr<Logger> info_log = nullptr,
     std::string trash_dir = "", int64_t rate_bytes_per_sec = 0,
     bool delete_existing_trash = true, Status* status = nullptr,
     double max_trash_db_ratio = 0.25,
-    uint64_t bytes_max_delete_chunk = 64 * 1024 * 1024);
+    uint64_t bytes_max_delete_chunk = 0);
 
 }  // namespace rocksdb