Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
Signed-off-by: tabokie <[email protected]>
  • Loading branch information
tabokie committed Apr 3, 2023
1 parent 2c0007f commit 8a608c6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions memtable/write_buffer_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,13 @@ void WriteBufferManager::MaybeFlushLocked(DB* this_db) {
uint64_t deadline_interval = flush_deadline_.load(std::memory_order_relaxed);
uint64_t deadline_time = 0;
if (deadline_interval != std::numeric_limits<uint64_t>::max()) {
uint64_t current;
SystemClock::Default()->GetCurrentTime(&current);
if (current > deadline_interval) {
deadline_time = current - deadline_interval;
int64_t current;
auto s = SystemClock::Default()->GetCurrentTime(&current);
if (s.ok()) {
assert(current > 0);
if (static_cast<uint64_t>(current) > deadline_interval) {
deadline_time = static_cast<uint64_t>(current) - deadline_interval;
}
}
}
for (auto& s : sentinels_) {
Expand Down

0 comments on commit 8a608c6

Please sign in to comment.