diff --git a/HISTORY.md b/HISTORY.md index 396301661..ffaf5f516 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -17,6 +17,7 @@ * fix deadlock with enable_pipelined_write=true and max_successive_merges > 0 * Fix corruption in non-iterator reads when mmap is used for file reads * 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 diff --git a/include/rocksdb/sst_file_manager.h b/include/rocksdb/sst_file_manager.h index 475a5d47b..d1133d871 100644 --- a/include/rocksdb/sst_file_manager.h +++ b/include/rocksdb/sst_file_manager.h @@ -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 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