diff --git a/HISTORY.md b/HISTORY.md index a3a0781ce..bb4631519 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -23,6 +23,7 @@ * Added DisableManualCompaction/EnableManualCompaction to stop and resume manual compaction. * Add TryCatchUpWithPrimary() to StackableDB in non-LITE mode. * Add a new Env::LoadEnv() overloaded function to return a shared_ptr to Env. +* Flush sets file name to "(nil)" for OnTableFileCreationCompleted() if the flush does not produce any L0. This can happen if the file is empty thus delete by RocksDB. ### Performance Improvements * Improve the speed of the MemTable Bloom filter, reducing the write overhead of enabling it by 1/3 to 1/2, with similar benefit to read performance. diff --git a/db/builder.cc b/db/builder.cc index 01ed32e0c..bf6ef6354 100644 --- a/db/builder.cc +++ b/db/builder.cc @@ -243,6 +243,9 @@ Status BuildTable( env->DeleteFile(fname); } + if (meta->fd.GetFileSize() == 0) { + fname = "(nil)"; + } // Output to event logger and fire events. EventHelpers::LogAndNotifyTableFileCreationFinished( event_logger, ioptions.listeners, dbname, column_family_name, fname,