Skip to content

Conversation

MozirDmitriy
Copy link
Contributor

The LevelDB metrics loop subtracted previous samples from DBStats fields that are already per-interval (Stats resets internal buffers on each call). This caused double-differencing and under-reported/zero deltas.

Changes:

  • Mark compaction meters using current interval values from LevelDB Stats (no previous-sample subtraction).
  • Mark write-delay meters with current WriteDelayCount/Duration directly; adjust stall warning to check zero current-interval deltas while paused.
  • Mark disk IO meters with current IORead/IOWrite interval values.
  • Keep disk size as an absolute gauge; remove previous-sample buffers and related state.

This aligns LevelDB metrics with its Stats semantics and matches Pebble’s approach (which uses cumulative counters, hence still needs deltas).

@rjl493456442
Copy link
Member

I don't think this fix is correct. What we actually care about is the statistical difference
between intervals, which should be uploaded to the meters.

Besides, since we plan to deprecate go-leveldb, it’s not worthwhile to accept changes against it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants