go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
804 stars 123 forks source link

added logic to handle corrupt whisper file without archive info #548

Closed auguzun closed 1 year ago

auguzun commented 1 year ago

Fixes problem with Index out of range panic which happens during read request with corrupt file.

panic: runtime error: index out of range [0] with length 0 goroutine 131144 [running]: github.com/go-graphite/go-carbon/carbonserver.(*CarbonserverListener).fetchFromDisk(0xc0001bee00,{0xc14dbea280, 0x75}, 0x63fedf9f, 0x63ff4211) go-carbon[55052]: carbonserver/fetchfromdisk.go:52 +0xfa9