mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 03:52:15 +00:00
Fix progress rows and bytes read
This commit is contained in:
parent
88736a0d74
commit
2ae9490a68
@ -81,11 +81,11 @@ void JSONCompactWithProgressRowOutputFormat::writeExtremesElement(const char * t
|
||||
|
||||
void JSONCompactWithProgressRowOutputFormat::onProgress(const Progress & value)
|
||||
{
|
||||
progress.incrementPiecewiseAtomically(value);
|
||||
statistics.progress.incrementPiecewiseAtomically(value);
|
||||
String progress_line;
|
||||
WriteBufferFromString buf(progress_line);
|
||||
writeCString("{\"progress\":", buf);
|
||||
progress.writeJSON(buf);
|
||||
statistics.progress.writeJSON(buf);
|
||||
writeCString("}\n", buf);
|
||||
buf.finalize();
|
||||
std::lock_guard lock(progress_lines_mutex);
|
||||
@ -127,7 +127,6 @@ void JSONCompactWithProgressRowOutputFormat::finalizeImpl()
|
||||
settings.write_statistics && exception_message.empty(),
|
||||
*ostr);
|
||||
|
||||
exception_message = "Test exception message.";
|
||||
if (!exception_message.empty())
|
||||
{
|
||||
writeCString("\n", *ostr);
|
||||
|
@ -46,7 +46,6 @@ private:
|
||||
void finalizeImpl() override;
|
||||
|
||||
|
||||
Progress progress;
|
||||
std::vector<String> progress_lines;
|
||||
std::mutex progress_lines_mutex;
|
||||
/// To not lock mutex and check progress_lines every row,
|
||||
|
Loading…
Reference in New Issue
Block a user