sync before destruct

This commit is contained in:
zhenjial 2022-09-13 15:06:22 +08:00
parent 16c8cd0bd3
commit 67c08e3e22
2 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,11 @@ InputFormatErrorsLogger::InputFormatErrorsLogger(const ContextPtr & context)
writer = context->getOutputFormat(output_format, *write_buf, header); writer = context->getOutputFormat(output_format, *write_buf, header);
} }
InputFormatErrorsLogger::~InputFormatErrorsLogger()
{
write_buf->sync();
}
void InputFormatErrorsLogger::logErrorImpl(ErrorEntry entry) void InputFormatErrorsLogger::logErrorImpl(ErrorEntry entry)
{ {
auto error = header.cloneEmpty(); auto error = header.cloneEmpty();

View File

@ -20,7 +20,7 @@ public:
InputFormatErrorsLogger(const ContextPtr & context); InputFormatErrorsLogger(const ContextPtr & context);
virtual ~InputFormatErrorsLogger() = default; virtual ~InputFormatErrorsLogger();
virtual void logError(ErrorEntry entry); virtual void logError(ErrorEntry entry);
void logErrorImpl(ErrorEntry entry); void logErrorImpl(ErrorEntry entry);