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:
parent
3fbc865cd5
commit
c48764ba47
@ -222,9 +222,11 @@ Status BuildTable(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output to event logger and fire events.
|
// Output to event logger and fire events.
|
||||||
|
if (!s.ok() || meta->fd.GetFileSize() > 0) {
|
||||||
EventHelpers::LogAndNotifyTableFileCreationFinished(
|
EventHelpers::LogAndNotifyTableFileCreationFinished(
|
||||||
event_logger, ioptions.listeners, dbname, column_family_name, fname,
|
event_logger, ioptions.listeners, dbname, column_family_name, fname,
|
||||||
job_id, meta->fd, tp, reason, s);
|
job_id, meta->fd, tp, reason, s);
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user