Details
-
Bug
-
Resolution: Fixed
-
Minor
-
7.6.0, 7.0.0, 7.1.1, 7.2.0, 7.2.4, 7.1.6, 7.2.5, 7.6.2, 7.6.1
-
None
-
Untriaged
-
0
-
No
Description
This metric is calculated based on counters from the flusher in KV. When a mutation comes in, we increment dirtyQueueSize by 1 and dirtyQueueAge by the queue time of the mutation. When the mutation is written to disk, we decrement these by the same amounts.
Metrics collection runs on a separate thread from the FlusherTask (which writes to disk), so a metrics scrape can observe an incremented dirtyQueueAge and non-incremented dirtyQueueSize (same in the decrement case).
The kv_vb_queue_age_seconds is computed as:
now() * dirtyQueueSize - dirtyQueueAge
Where dirtyQueueAge is loaded from memory first, we can see a dirtyQueueAge that is small at the end of the flush batch and a dirtyQueueSize which is larger if new mutations just came in, resulting in underflow which wraps around.
Attachments
For Gerrit Dashboard: MB-61960 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
210916,2 | MB-61960: Avoid overflow in getQueueAge | master | kv_engine | Status: MERGED | +2 | +1 |