mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Remove sycn which shouldn't be necessary
This commit is contained in:
parent
1375733643
commit
1d6718f43d
@ -66,14 +66,12 @@ void ISource::progress(size_t read_rows, size_t read_bytes)
|
||||
{
|
||||
//std::cerr << "========= Progress " << read_rows << " from " << getName() << std::endl << StackTrace().toString() << std::endl;
|
||||
read_progress_was_set = true;
|
||||
std::lock_guard lock(read_progress_mutex);
|
||||
read_progress.read_rows += read_rows;
|
||||
read_progress.read_bytes += read_bytes;
|
||||
}
|
||||
|
||||
std::optional<ISource::ReadProgress> ISource::getReadProgress()
|
||||
{
|
||||
std::lock_guard lock(read_progress_mutex);
|
||||
if (finished && read_progress.read_bytes == 0 && read_progress.total_rows_approx == 0)
|
||||
return {};
|
||||
|
||||
@ -89,13 +87,11 @@ std::optional<ISource::ReadProgress> ISource::getReadProgress()
|
||||
|
||||
void ISource::addTotalRowsApprox(size_t value)
|
||||
{
|
||||
std::lock_guard lock(read_progress_mutex);
|
||||
read_progress.total_rows_approx += value;
|
||||
}
|
||||
|
||||
void ISource::addTotalBytes(size_t value)
|
||||
{
|
||||
std::lock_guard lock(read_progress_mutex);
|
||||
read_progress.total_bytes += value;
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
#include <Processors/IProcessor.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -12,9 +9,8 @@ namespace DB
|
||||
class ISource : public IProcessor
|
||||
{
|
||||
private:
|
||||
std::mutex read_progress_mutex;
|
||||
ReadProgressCounters read_progress;
|
||||
std::atomic_bool read_progress_was_set = false;
|
||||
bool read_progress_was_set = false;
|
||||
bool auto_progress;
|
||||
|
||||
protected:
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
|
||||
const bool async_read;
|
||||
const bool async_query_sending;
|
||||
bool is_async_state = false;
|
||||
std::atomic_bool is_async_state = false;
|
||||
int fd = -1;
|
||||
size_t rows = 0;
|
||||
bool manually_add_rows_before_limit_counter = false;
|
||||
|
Loading…
Reference in New Issue
Block a user