{"record":{"id":"e36eb228a4ff25a0","repo":"netdata/netdata","slug":"w-quantile-count-mismatch","errorCode":null,"errorMessage":"%w: quantile count mismatch","messagePattern":"%w: quantile count mismatch","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/go/pkg/metrix/summary.go","lineNumber":216,"sourceCode":"}\n\nfunc normalizeSummaryPoint(point SummaryPoint, schema *summarySchema) (SampleValue, SampleValue, []SampleValue) {\n\tmustFiniteSample(point.Count)\n\tmustFiniteSample(point.Sum)\n\n\tif point.Count < 0 {\n\t\tpanic(fmt.Errorf(\"%w: negative count\", errSummaryPoint))\n\t}\n\n\tif schema == nil || len(schema.quantiles) == 0 {\n\t\tif len(point.Quantiles) > 0 {\n\t\t\tpanic(fmt.Errorf(\"%w: quantiles are not configured for this instrument\", errSummaryPoint))\n\t\t}\n\t\treturn point.Count, point.Sum, nil\n\t}\n\n\tif len(point.Quantiles) != len(schema.quantiles) {\n\t\tpanic(fmt.Errorf(\"%w: quantile count mismatch\", errSummaryPoint))\n\t}\n\n\tvalues := make([]SampleValue, len(schema.quantiles))\n\tseen := make(map[float64]struct{}, len(schema.quantiles))\n\tfor _, q := range point.Quantiles {\n\t\tif math.IsNaN(q.Quantile) || q.Quantile < 0 || q.Quantile > 1 {\n\t\t\tpanic(fmt.Errorf(\"%w: invalid quantile %v\", errSummaryPoint, q.Quantile))\n\t\t}\n\t\tif _, ok := seen[q.Quantile]; ok {\n\t\t\tpanic(fmt.Errorf(\"%w: duplicate quantile %v\", errSummaryPoint, q.Quantile))\n\t\t}\n\t\tseen[q.Quantile] = struct{}{}\n\n\t\tidx := summaryQuantileIndex(schema.quantiles, q.Quantile)\n\t\tif idx == -1 {\n\t\t\tpanic(fmt.Errorf(\"%w: quantile %v is not declared\", errSummaryPoint, q.Quantile))\n\t\t}\n\t\t// A summary may report a NaN quantile value (e.g. an empty observation window). Store it;","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/netdata/netdata/blob/4864de85e26f6734d92cfc27ccbeff5921f49938/src/go/pkg/metrix/summary.go#L198-L234","documentation":"Error \"%w: quantile count mismatch\" thrown in netdata/netdata.","triggerScenarios":"Thrown at src/go/pkg/metrix/summary.go:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The number of quantile values in the point does not match the declared quantiles.","Provide exactly one value per declared quantile."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4864de85e26f6734d92cfc27ccbeff5921f49938","analyzedAt":"2026-08-15T09:12:38.226Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}