This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new f51cfce6c3 [fix](compile) fix compile failed in some case due to
std::pair
f51cfce6c3 is described below
commit f51cfce6c3484f9f8ddb1317935d81b22bf97c8d
Author: yangzhg <[email protected]>
AuthorDate: Mon Dec 26 17:41:39 2022 +0800
[fix](compile) fix compile failed in some case due to std::pair
---
be/src/runtime/memory/mem_tracker_limiter.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/be/src/runtime/memory/mem_tracker_limiter.cpp
b/be/src/runtime/memory/mem_tracker_limiter.cpp
index a37a0be0f9..aea4b5f806 100644
--- a/be/src/runtime/memory/mem_tracker_limiter.cpp
+++ b/be/src/runtime/memory/mem_tracker_limiter.cpp
@@ -285,17 +285,17 @@ int64_t MemTrackerLimiter::free_top_memory_query(int64_t
min_free_mem) {
std::greater<std::pair<int64_t,
std::string>>>
min_pq_null;
std::swap(min_pq, min_pq_null);
- min_pq.push(
- pair<int64_t, std::string>(tracker->consumption(),
tracker->label()));
+ min_pq.push(std::pair<int64_t,
std::string>(tracker->consumption(),
+
tracker->label()));
return cancel_top_query(min_pq);
} else if (tracker->consumption() + prepare_free_mem <
min_free_mem) {
- min_pq.push(
- pair<int64_t, std::string>(tracker->consumption(),
tracker->label()));
+ min_pq.push(std::pair<int64_t,
std::string>(tracker->consumption(),
+
tracker->label()));
prepare_free_mem += tracker->consumption();
} else if (tracker->consumption() > min_pq.top().first) {
// No need to modify prepare_free_mem, prepare_free_mem
will always be greater than min_free_mem.
- min_pq.push(
- pair<int64_t, std::string>(tracker->consumption(),
tracker->label()));
+ min_pq.push(std::pair<int64_t,
std::string>(tracker->consumption(),
+
tracker->label()));
min_pq.pop();
}
}
@@ -320,7 +320,7 @@ int64_t
MemTrackerLimiter::free_top_overcommit_query(int64_t min_free_mem) {
if (overcommit_ratio == 0) { // Small query does not cancel
continue;
}
- min_pq.push(pair<int64_t, std::string>(overcommit_ratio,
tracker->label()));
+ min_pq.push(std::pair<int64_t, std::string>(overcommit_ratio,
tracker->label()));
query_consumption[tracker->label()] = tracker->consumption();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]