Skip to content

Commit

Permalink
[fix](load) fix priority queue order in memtable memory limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
kaijchen committed Sep 25, 2024
1 parent b6d2102 commit 153e852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/olap/memtable_memory_limiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void MemTableMemoryLimiter::_flush_active_memtables(int64_t need_flush) {
}

using WriterMem = std::pair<std::weak_ptr<MemTableWriter>, int64_t>;
auto cmp = [](WriterMem left, WriterMem right) { return left.second > right.second; };
auto cmp = [](WriterMem left, WriterMem right) { return left.second < right.second; };
std::priority_queue<WriterMem, std::vector<WriterMem>, decltype(cmp)> heap(cmp);

for (auto writer : _active_writers) {
Expand Down

0 comments on commit 153e852

Please sign in to comment.