diff --git a/be/src/olap/memtable_memory_limiter.cpp b/be/src/olap/memtable_memory_limiter.cpp index 464e729c1b4499..edb8ab57f87af9 100644 --- a/be/src/olap/memtable_memory_limiter.cpp +++ b/be/src/olap/memtable_memory_limiter.cpp @@ -163,7 +163,7 @@ void MemTableMemoryLimiter::_flush_active_memtables(int64_t need_flush) { } using WriterMem = std::pair, 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, decltype(cmp)> heap(cmp); for (auto writer : _active_writers) {