Don't generate a notification for a 0 size SST (#4003)

Summary:
Don't call the OnTableFileCreated listener callback when a 0 size SST
file gets created by Flush. Doing so causes an assertion failure in db_stress. It is also not correct behavior as we call env->DeleteFile() for such files right before the notification.
Closes https://github.com/facebook/rocksdb/pull/4003

Differential Revision: D8461385

Pulled By: anand1976

fbshipit-source-id: ae92d4f921c2e2cff981ad58f4929ed8b609f35d
This commit is contained in:
Anand Ananthabhotla 2018-06-15 17:53:12 -07:00 committed by Facebook Github Bot
parent 3fbc865cd5
commit c48764ba47

View File

@ -222,9 +222,11 @@ Status BuildTable(
}
// Output to event logger and fire events.
if (!s.ok() || meta->fd.GetFileSize() > 0) {
EventHelpers::LogAndNotifyTableFileCreationFinished(
event_logger, ioptions.listeners, dbname, column_family_name, fname,
job_id, meta->fd, tp, reason, s);
}
return s;
}