Log out memory in MB (#26262)

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
pull/26640/head
smellthemoon 2023-08-30 17:13:00 +08:00 committed by GitHub
parent 2aab9b3234
commit 6069a7d42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -91,11 +91,15 @@ func (fm *flowgraphManager) execute(totalMemory uint64) {
return
}
toMB := func(mem float64) float64 {
return mem / 1024 / 1024
}
memoryWatermark := float64(totalMemory) * Params.DataNodeCfg.MemoryWatermark.GetAsFloat()
if float64(total) < memoryWatermark {
log.RatedDebug(5, "skip force sync because memory level is not high enough",
zap.Float64("current_total_memory_usage", float64(total)),
zap.Float64("current_memory_watermark", memoryWatermark),
zap.Float64("current_total_memory_usage", toMB(float64(total))),
zap.Float64("current_memory_watermark", toMB(memoryWatermark)),
zap.Any("channel_memory_usages", channels))
return
}