Skip to content

Commit f939529

Browse files
authored
remove duplicated log messages (backport #11469) (#11512)
1 parent df61055 commit f939529

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ydb/library/yql/dq/actors/compute/dq_compute_memory_quota.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@ namespace NYql::NDq {
9090
}
9191

9292
if (Y_UNLIKELY(ProfileStats)) {
93-
ProfileStats->MkqlMaxUsedMemory = std::max(ProfileStats->MkqlMaxUsedMemory, alloc->GetPeakAllocated());
94-
CAMQ_LOG_T("Peak memory usage: " << ProfileStats->MkqlMaxUsedMemory);
93+
auto& previousMaxUsedMemory = ProfileStats->MkqlMaxUsedMemory;
94+
auto currentUsedMemory = alloc->GetPeakAllocated();
95+
if (currentUsedMemory > previousMaxUsedMemory) {
96+
previousMaxUsedMemory = currentUsedMemory;
97+
CAMQ_LOG_T("Peak memory usage: " << currentUsedMemory);
98+
}
9599
}
96100
}
97101

0 commit comments

Comments
 (0)