{"record":{"id":"8d8cc136aa3f5c14","repo":"apache/beam","slug":"unknown-coder-used-for-ordered-list-state-after-re-write-id","errorCode":null,"errorMessage":"unknown coder used for ordered list state after re-write id: %v coder: %v, for state %v for transform %v in stage %v","messagePattern":"unknown coder used for ordered list state after re-write id: (.+?) coder: (.+?), for state (.+?) for transform (.+?) in stage (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/prism/internal/stage.go","lineNumber":500,"sourceCode":"\t\t\t\t\tfn = func(_ []byte) int {\n\t\t\t\t\t\treturn 1\n\t\t\t\t\t}\n\t\t\t\tcase urns.CoderDouble:\n\t\t\t\t\tfn = func(_ []byte) int {\n\t\t\t\t\t\treturn 8\n\t\t\t\t\t}\n\t\t\t\tcase urns.CoderVarInt:\n\t\t\t\t\tfn = func(b []byte) int {\n\t\t\t\t\t\t_, n := protowire.ConsumeVarint(b)\n\t\t\t\t\t\treturn int(n)\n\t\t\t\t\t}\n\t\t\t\tcase urns.CoderLengthPrefix, urns.CoderBytes, urns.CoderStringUTF8:\n\t\t\t\t\tfn = func(b []byte) int {\n\t\t\t\t\t\tl, n := protowire.ConsumeVarint(b)\n\t\t\t\t\t\treturn int(l) + n\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\trewriteErr = fmt.Errorf(\"unknown coder used for ordered list state after re-write id: %v coder: %v, for state %v for transform %v in stage %v\", s.OrderedListSpec.GetElementCoderId(), v, stateID, tid, stg.ID)\n\t\t\t\t}\n\t\t\t\tstg.stateTypeLen[linkID] = fn\n\t\t\tcase *pipepb.StateSpec_CombiningSpec:\n\t\t\t\trewriteCoder(&s.CombiningSpec.AccumulatorCoderId)\n\t\t\tcase *pipepb.StateSpec_MapSpec:\n\t\t\t\trewriteCoder(&s.MapSpec.KeyCoderId)\n\t\t\t\trewriteCoder(&s.MapSpec.ValueCoderId)\n\t\t\tcase *pipepb.StateSpec_MultimapSpec:\n\t\t\t\trewriteCoder(&s.MultimapSpec.KeyCoderId)\n\t\t\t\trewriteCoder(&s.MultimapSpec.ValueCoderId)\n\t\t\tcase *pipepb.StateSpec_ReadModifyWriteSpec:\n\t\t\t\trewriteCoder(&s.ReadModifyWriteSpec.CoderId)\n\t\t\t}\n\t\t\tif rewriteErr != nil {\n\t\t\t\treturn rewriteErr\n\t\t\t}\n\t\t}\n\t\tfor timerID, v := range pardo.GetTimerFamilySpecs() {","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/stage.go#L482-L518","documentation":"For OrderedList state, prism must know the element coder's length-prefixing function to slice the encoded list; after rewriting, if the element coder resolves to a coder URN it doesn't support (not LengthPrefix, Bytes, or StringUtf8), it fails with this detailed error.","triggerScenarios":"An OrderedList state spec whose element coder, after rewrite, is a coder prism has no length-computation for — e.g. custom or composite element coders.","commonSituations":"Using OrderedList state with custom element encodings; cross-language pipelines emitting coders prism can't measure; SDK producing new coder types before prism support.","solutions":["Use supported element coders (bytes/string-utf8/length-prefixed) for OrderedList state","Change the state type or element coder in the DoFn to one prism supports","Upgrade Beam — supported coder lists expand over time","File a Beam issue requesting support for the specific coder URN"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"switch coderUrn {\ncase urns.CoderLengthPrefix, urns.CoderBytes, urns.CoderStringUTF8:\n    // ok\ndefault:\n    return fmt.Errorf(\"unsupported OrderedList element coder %v\", coderUrn)\n}","typeGuard":null,"tryCatchPattern":"if err := buildDescriptor(...); err != nil {\n    if strings.Contains(err.Error(), \"ordered list state\") {\n        // switch state element coder to a supported one\n    }\n    return err\n}","preventionTips":["Restrict OrderedList state elements to bytes/string/length-prefixed coders","Avoid custom coders for ordered list state with prism","Track Beam releases for expanded ordered-list coder support"],"tags":["go","beam","state","ordered-list","coder"],"backgroundTag":"unsupported-coder","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}