From c324f424d16a646e34cd1263fde3eb44d76af712 Mon Sep 17 00:00:00 2001 From: pboros Date: Thu, 18 Dec 2025 15:33:59 +0000 Subject: [PATCH] fix: possible nil pointer dereference in storage queue calculation --- metrics/group_processes.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/metrics/group_processes.go b/metrics/group_processes.go index 422b94d..ea144cf 100644 --- a/metrics/group_processes.go +++ b/metrics/group_processes.go @@ -239,7 +239,9 @@ func (p *ProcessesMetricGroup) GetMetrics(status *models.FullStatus) { // Storage queue size, if this is growing, it means the storages can't keep up with the load // and they need to be scaled out. - metrics["storage_queue_length"] = role.InputBytes.Counter - role.DurableBytes.Counter + if role.InputBytes != nil && role.DurableBytes != nil { + metrics["storage_queue_length"] = role.InputBytes.Counter - role.DurableBytes.Counter + } if role.ReadLatencyStatistics != nil { readLatScope := p.GetScopeOrExit("read_lat")