From 4ea56b1bd00b5f8751e5e9733d01ceb33ebd09e3 Mon Sep 17 00:00:00 2001 From: Anand Ananthabhotla Date: Sat, 11 Aug 2018 16:44:11 -0700 Subject: [PATCH] Revert changes in PR #4003 (#4263) Summary: Revert this change. Not generating the OnTableFileCreated() notification for a 0 byte SST on flush breaks the assumption that every OnTableFileCreationStarted() notification is followed by a corresponding OnTableFileCreated(). Pull Request resolved: https://github.com/facebook/rocksdb/pull/4263 Differential Revision: D9285623 Pulled By: anand1976 fbshipit-source-id: 808c3dcd498b4b4f4ed4be947a29a24b2296aa8d --- db/builder.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/db/builder.cc b/db/builder.cc index d52361046..c592a9647 100644 --- a/db/builder.cc +++ b/db/builder.cc @@ -230,11 +230,9 @@ 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); - } + EventHelpers::LogAndNotifyTableFileCreationFinished( + event_logger, ioptions.listeners, dbname, column_family_name, fname, + job_id, meta->fd, tp, reason, s); return s; }