@@ -635,18 +635,18 @@ func (f *FileStore) Open(ctx context.Context) error {
635
635
// be left untouched, and the vm.max_map_count be raised.
636
636
f .logger .Error ("Cannot read TSM file, system limit for vm.max_map_count may be too low" ,
637
637
zap .String ("path" , file .Name ()), zap .Int ("id" , idx ), zap .Error (err ))
638
- readerC <- & res {r : df , err : fmt .Errorf ("cannot read file %s, system limit for vm.max_map_count may be too low: %v " , file .Name (), err )}
638
+ readerC <- & res {r : df , err : fmt .Errorf ("cannot read file %s, system limit for vm.max_map_count may be too low: %w " , file .Name (), err )}
639
639
return
640
640
} else {
641
641
// If the file is corrupt, rename it and
642
642
// continue loading the shard without it.
643
643
f .logger .Error ("Cannot read corrupt tsm file, renaming" , zap .String ("path" , file .Name ()), zap .Int ("id" , idx ), zap .Error (err ))
644
644
if e := os .Rename (file .Name (), file .Name ()+ "." + BadTSMFileExtension ); e != nil {
645
645
f .logger .Error ("Cannot rename corrupt tsm file" , zap .String ("path" , file .Name ()), zap .Int ("id" , idx ), zap .Error (e ))
646
- readerC <- & res {r : df , err : fmt .Errorf ("cannot rename corrupt file %s: %v " , file .Name (), e )}
646
+ readerC <- & res {r : df , err : fmt .Errorf ("cannot rename corrupt file %s: %w " , file .Name (), e )}
647
647
return
648
648
}
649
- readerC <- & res {r : df , err : fmt .Errorf ("cannot read corrupt file %s: %v " , file .Name (), err )}
649
+ readerC <- & res {r : df , err : fmt .Errorf ("cannot read corrupt file %s: %w " , file .Name (), err )}
650
650
return
651
651
}
652
652
}
0 commit comments