@@ -635,18 +635,18 @@ func (f *FileStore) Open(ctx context.Context) error {
635635 // be left untouched, and the vm.max_map_count be raised.
636636 f .logger .Error ("Cannot read TSM file, system limit for vm.max_map_count may be too low" ,
637637 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 )}
639639 return
640640 } else {
641641 // If the file is corrupt, rename it and
642642 // continue loading the shard without it.
643643 f .logger .Error ("Cannot read corrupt tsm file, renaming" , zap .String ("path" , file .Name ()), zap .Int ("id" , idx ), zap .Error (err ))
644644 if e := os .Rename (file .Name (), file .Name ()+ "." + BadTSMFileExtension ); e != nil {
645645 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 )}
647647 return
648648 }
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 )}
650650 return
651651 }
652652 }
0 commit comments