mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
fix(memory): Add missing fields in connection memory (#2306)
While at it, fix initialization of replication info, to correctly account for replication connections.
This commit is contained in:
parent
bd3e57d262
commit
a98ba6a0f8
6 changed files with 45 additions and 15 deletions
|
@ -191,14 +191,6 @@ ConnectionMemoryUsage GetConnectionMemoryUsage(ServerFamily* server) {
|
|||
mems[thread_index].replication_connection_size += usage.mem;
|
||||
mems[thread_index].replication_memory += usage.buf_mem;
|
||||
}
|
||||
|
||||
if (cntx != nullptr) {
|
||||
mems[thread_index].pipelined_bytes +=
|
||||
cntx->conn_state.exec_info.body.capacity() * sizeof(StoredCmd);
|
||||
for (const auto& pipeline : cntx->conn_state.exec_info.body) {
|
||||
mems[thread_index].pipelined_bytes += pipeline.UsedHeapMemory();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue