mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-27 16:32:54 +00:00
fix: partition tree's dict size metrics mismatch (#6746)
fix: partition tree metrics mismatch Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -100,10 +100,10 @@ impl KeyDictBuilder {
|
||||
|
||||
// Since we store the key twice so the bytes usage doubled.
|
||||
metrics.key_bytes += full_primary_key.len() * 2 + sparse_key_len;
|
||||
self.key_bytes_in_index += full_primary_key.len();
|
||||
self.key_bytes_in_index += full_primary_key.len() + sparse_key_len;
|
||||
|
||||
// Adds key size of index to the metrics.
|
||||
MEMTABLE_DICT_BYTES.add((full_primary_key.len() + sparse_key_len) as i64);
|
||||
MEMTABLE_DICT_BYTES.add(self.key_bytes_in_index as i64);
|
||||
|
||||
pk_index
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user