{"record":{"id":"04adccd5563af0ce","repo":"thanos-io/thanos","slug":"ignore-function","errorCode":null,"errorMessage":"ignore function","messagePattern":"ignore function","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/block/index.go","lineNumber":554,"sourceCode":"\tsort.Slice(chks, func(i, j int) bool {\n\t\treturn chks[i].MinTime < chks[j].MinTime\n\t})\n\n\t// Remove duplicates, complete outsiders and near outsiders.\n\trepl := make([]chunks.Meta, 0, len(chks))\n\tvar last *chunks.Meta\n\nOUTER:\n\t// This compares the current chunk to the chunk from the last iteration\n\t// by pointers.  If we use \"i, c := range chks\" the variable c is a new\n\t// variable who's address doesn't change through the entire loop.\n\t// The current element of the chks slice is copied into it. We must take\n\t// the address of the indexed slice instead.\n\tfor i := range chks {\n\t\tfor _, ignoreChkFn := range ignoreChkFns {\n\t\t\tignore, err := ignoreChkFn(mint, maxt, last, &chks[i])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, errors.Wrap(err, \"ignore function\")\n\t\t\t}\n\n\t\t\tif ignore {\n\t\t\t\tcontinue OUTER\n\t\t\t}\n\t\t}\n\n\t\tlast = &chks[i]\n\t\trepl = append(repl, chks[i])\n\t}\n\n\treturn repl, nil\n}\n\ntype seriesRepair struct {\n\tlset labels.Labels\n\tchks []chunks.Meta\n}","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/index.go#L536-L572","documentation":"sanitizeChunkSequence failed while applying an ignore function (dedup/outside-chunk filter) to the chunk sequence during rewrite; the wrapped error comes from IgnoreDuplicateOutsideChunk or similar, aborting the block rewrite.","triggerScenarios":"Thrown at pkg/block/index.go:554 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Look at the wrapped ignore-function error for the exact chunk conflict","Fix underlying duplicated/corrupt chunks first","Retry repair after resolving"],"exampleFix":null,"handlingStrategy":"try-catch","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"}