OnTableFileCreationCompleted use "(nil)" for empty file during flush (#5905)
Summary: Compaction can call OnTableFileCreationCompleted(). If file is empty, "(nil)" is used as the file name. Do the same for flush. Test plan (dev server): ``` make all make check ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/5905 Differential Revision: D17883285 Pulled By: riversand963 fbshipit-source-id: 6565884adbb00e8023d88b17dfb3b6eb92220b59
This commit is contained in:
parent
4e729f9095
commit
6febfd8451
@ -23,6 +23,7 @@
|
|||||||
* Added DisableManualCompaction/EnableManualCompaction to stop and resume manual compaction.
|
* Added DisableManualCompaction/EnableManualCompaction to stop and resume manual compaction.
|
||||||
* Add TryCatchUpWithPrimary() to StackableDB in non-LITE mode.
|
* Add TryCatchUpWithPrimary() to StackableDB in non-LITE mode.
|
||||||
* Add a new Env::LoadEnv() overloaded function to return a shared_ptr to Env.
|
* 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
|
### 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.
|
* 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.
|
||||||
|
|
||||||
|
@ -243,6 +243,9 @@ Status BuildTable(
|
|||||||
env->DeleteFile(fname);
|
env->DeleteFile(fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (meta->fd.GetFileSize() == 0) {
|
||||||
|
fname = "(nil)";
|
||||||
|
}
|
||||||
// Output to event logger and fire events.
|
// Output to event logger and fire events.
|
||||||
EventHelpers::LogAndNotifyTableFileCreationFinished(
|
EventHelpers::LogAndNotifyTableFileCreationFinished(
|
||||||
event_logger, ioptions.listeners, dbname, column_family_name, fname,
|
event_logger, ioptions.listeners, dbname, column_family_name, fname,
|
||||||
|
Loading…
Reference in New Issue
Block a user