Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
JinheLin committed Oct 8, 2022
1 parent 64c9b31 commit 3086e5f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions dbms/src/Encryption/RateLimiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 0 additions & 3 deletions dbms/src/Encryption/RateLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ class ReadLimiter : public WriteLimiter

std::function<Int64()> getIOStatistic;
Int64 last_stat_bytes;
<<<<<<< HEAD
using TimePoint = std::chrono::time_point<std::chrono::system_clock, std::chrono::microseconds>;
static TimePoint now()
{
Expand All @@ -193,9 +192,7 @@ class ReadLimiter : public WriteLimiter
Poco::Logger * log;

Int64 get_io_statistic_period_us;
=======
std::chrono::time_point<std::chrono::system_clock> last_refill_time;
>>>>>>> b232bcd66c (Fix `alloc_bytes` of ReadLimiter (#5852))
};

using ReadLimiterPtr = std::shared_ptr<ReadLimiter>;
Expand Down
5 changes: 0 additions & 5 deletions dbms/src/TestUtils/MockReadLimiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
};

Expand Down

0 comments on commit 3086e5f

Please sign in to comment.