de43a71929
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
15 lines
236 B
Go
15 lines
236 B
Go
//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)
|
|
}
|