{"record":{"id":"58a068ebceac70cb","repo":"apache/beam","slug":"illegal-re-iter-type-v","errorCode":null,"errorMessage":"illegal re-iter type: %v","messagePattern":"illegal re-iter type: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/input.go","lineNumber":73,"sourceCode":"\tdefer inputsMu.Unlock()\n\tinputs[t] = maker\n}\n\n// IsInputRegistered returns whether an input maker has already been registered.\nfunc IsInputRegistered(t reflect.Type) bool {\n\t_, exists := inputs[t]\n\treturn exists\n}\n\ntype reIterValue struct {\n\tt  reflect.Type\n\ts  ReStream\n\tfn any\n}\n\nfunc makeReIter(t reflect.Type, s ReStream) ReusableInput {\n\tif !funcx.IsReIter(t) {\n\t\tpanic(fmt.Sprintf(\"illegal re-iter type: %v\", t))\n\t}\n\n\tret := &reIterValue{t: t, s: s}\n\tret.fn = reflect.MakeFunc(t, ret.invoke).Interface()\n\treturn ret\n}\n\nfunc (v *reIterValue) Init() error {\n\treturn nil\n}\n\nfunc (v *reIterValue) Value() any {\n\treturn v.fn\n}\n\nfunc (v *reIterValue) Reset() error {\n\treturn nil\n}","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/input.go#L55-L91","documentation":"makeReIter wraps a ReStream as a reflection function value only when the target type is a valid 're-iterable' function type (func(*func) bool style recognized by funcx.IsReIter). If the expected type isn't such a re-iterator, the wrapping is impossible and it panics with the offending type.","triggerScenarios":"makeSideInput building a side-input value whose declared function type t fails funcx.IsReIter — e.g. the side input type doesn't match a ReStream-backed re-iterable signature.","commonSituations":"Mismatch between the side input's declared coder/type in the pipeline graph and what makeSideInput expects; hand-constructed pipeline graphs or version-skew between graph construction and execution code.","solutions":["Fix the side input type so it is a valid re-iterable function type (e.g. func(*func) bool variants funcx recognizes).","Verify the DoFn's side-input parameter type matches the actual side input kind (iter vs reiter vs slice).","If you control construction, validate with funcx.IsReIter before calling makeReIter and raise a descriptive error."],"exampleFix":"// before\nin := makeReIter(badType, stream) // panics: illegal re-iter type\n// after\nif !funcx.IsReIter(badType) {\n\treturn nil, fmt.Errorf(\"unsupported side input type %v\", badType)\n}\nin := makeReIter(badType, stream)","handlingStrategy":"type-guard","validationCode":"if !funcx.IsReIter(t) {\n\treturn fmt.Errorf(\"side input type %v is not a valid re-iterator\", t)\n}","typeGuard":"func usableReIter(t reflect.Type) bool { return funcx.IsReIter(t) }","tryCatchPattern":null,"preventionTips":["Match side-input parameter types exactly to the declared side input kind.","Use the beam.SideInput helpers rather than hand-constructing input types.","Keep pipeline graph construction and execution on the same Beam version."],"tags":["go","panic","beam","side-input","reflection"],"backgroundTag":"incompatible-source-type","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}