ops: Signal disk-full and eviction capacity pressure
When the disk (or memory) tier is at cap or the volume returns ENOSPC, ops currently look like random misses with no clear "we are dropping data." Count those events as capacity_pressure_events on /metrics and log tier plus reason so operators can tell capacity pressure from a cold cache, without changing the existing evictions counter. Link: #36
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
//go:build !windows
|
||||
|
||||
package disk
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// isNoSpaceError reports whether err is ENOSPC (or wraps it).
|
||||
func isNoSpaceError(err error) bool {
|
||||
return err != nil && errors.Is(err, unix.ENOSPC)
|
||||
}
|
||||
Reference in New Issue
Block a user