{"record":{"id":"5e796cdb2cc4e9a1","repo":"thanos-io/thanos","slug":"corrupted-blocks-found","errorCode":null,"errorMessage":"corrupted blocks found","messagePattern":"corrupted blocks found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/shipper/shipper.go","lineNumber":95,"sourceCode":"\tlogger           log.Logger\n\tdir              *os.Root\n\tmetrics          *metrics\n\tbucket           objstore.Bucket\n\tsource           metadata.SourceType\n\tmetadataFilePath string\n\n\tuploadCompacted        bool\n\tallowOutOfOrderUploads bool\n\tskipCorruptedBlocks    bool\n\thashFunc               metadata.HashFunc\n\tuploadConcurrency      int\n\n\tlabels func() labels.Labels\n\tmtx    sync.RWMutex\n}\n\nvar (\n\tErrorSyncBlockCorrupted = errors.New(\"corrupted blocks found\")\n)\n\ntype shipperOptions struct {\n\tlogger                 log.Logger\n\tr                      prometheus.Registerer\n\tsource                 metadata.SourceType\n\thashFunc               metadata.HashFunc\n\tmetaFileName           string\n\tlbls                   func() labels.Labels\n\tuploadCompacted        bool\n\tallowOutOfOrderUploads bool\n\tskipCorruptedBlocks    bool\n\tuploadConcurrency      int\n}\n\ntype Option func(*shipperOptions)\n\n// WithLogger sets the logger.","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/shipper/shipper.go#L77-L113","documentation":"ErrorSyncBlockCorrupted is a sentinel error raised by the shipper's sync when blockMetasFromOldest detects corrupted block metadata among the blocks being uploaded. It is a generic guard: callers (Sync) deliberately compare against it with errors.Is and may skip corrupted blocks when the skipCorruptedBlocks option is set.","triggerScenarios":"Thrown at pkg/shipper/shipper.go:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect failedBlocks returned by sync to identify the corrupted block IDs","Delete or repair the corrupted local block metadata (meta.json) and re-sync","Set --skip-corrupted-blocks to continue uploading healthy blocks while ignoring corrupted ones"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}