From 3086e5fa8132a08f1adc20a2c0d9b321162fb034 Mon Sep 17 00:00:00 2001 From: jinhelin Date: Sat, 8 Oct 2022 11:03:04 +0800 Subject: [PATCH] Resolve conflicts --- dbms/src/Encryption/RateLimiter.cpp | 6 ------ dbms/src/Encryption/RateLimiter.h | 3 --- dbms/src/TestUtils/MockReadLimiter.h | 5 ----- 3 files changed, 14 deletions(-) diff --git a/dbms/src/Encryption/RateLimiter.cpp b/dbms/src/Encryption/RateLimiter.cpp index dd12d970291..9510903a063 100644 --- a/dbms/src/Encryption/RateLimiter.cpp +++ b/dbms/src/Encryption/RateLimiter.cpp @@ -299,17 +299,11 @@ ReadLimiter::ReadLimiter( Int64 get_io_stat_period_us, UInt64 refill_period_ms_) : WriteLimiter(rate_limit_per_sec_, type_, refill_period_ms_) -<<<<<<< HEAD , getIOStatistic(std::move(getIOStatistic_)) , last_stat_bytes(getIOStatistic()) , last_stat_time(now()) - , log(&Poco::Logger::get("ReadLimiter")) , get_io_statistic_period_us(get_io_stat_period_us) -======= - , get_read_bytes(std::move(get_read_bytes_)) - , last_stat_bytes(get_read_bytes()) , last_refill_time(std::chrono::system_clock::now()) ->>>>>>> b232bcd66c (Fix `alloc_bytes` of ReadLimiter (#5852)) {} Int64 ReadLimiter::getAvailableBalance() diff --git a/dbms/src/Encryption/RateLimiter.h b/dbms/src/Encryption/RateLimiter.h index 392c43a06f1..725a63ca1f3 100644 --- a/dbms/src/Encryption/RateLimiter.h +++ b/dbms/src/Encryption/RateLimiter.h @@ -183,7 +183,6 @@ class ReadLimiter : public WriteLimiter std::function getIOStatistic; Int64 last_stat_bytes; -<<<<<<< HEAD using TimePoint = std::chrono::time_point; static TimePoint now() { @@ -193,9 +192,7 @@ class ReadLimiter : public WriteLimiter Poco::Logger * log; Int64 get_io_statistic_period_us; -======= std::chrono::time_point last_refill_time; ->>>>>>> b232bcd66c (Fix `alloc_bytes` of ReadLimiter (#5852)) }; using ReadLimiterPtr = std::shared_ptr; diff --git a/dbms/src/TestUtils/MockReadLimiter.h b/dbms/src/TestUtils/MockReadLimiter.h index ea90785b25a..2d3c5cc1a75 100644 --- a/dbms/src/TestUtils/MockReadLimiter.h +++ b/dbms/src/TestUtils/MockReadLimiter.h @@ -32,13 +32,8 @@ class MockReadLimiter final : public ReadLimiter protected: void consumeBytes(Int64 bytes) override { -<<<<<<< HEAD - // Need soft limit here. - WriteLimiter::consumeBytes(bytes); -======= alloc_bytes += std::min(available_balance, bytes); available_balance -= bytes; ->>>>>>> b232bcd66c (Fix `alloc_bytes` of ReadLimiter (#5852)) } };