Remove sycn which shouldn't be necessary

This commit is contained in:
Igor Nikonov 2023-10-25 17:23:37 +00:00
parent 1375733643
commit 1d6718f43d
3 changed files with 2 additions and 10 deletions

View File

@ -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;
}

View File

@ -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:

View File

@ -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;