{"record":{"id":"f5d6166fa5016ed2","repo":"apache/beam","slug":"failed-to-create-keyed-iterable-got-v","errorCode":null,"errorMessage":"failed to create keyed iterable, got %v","messagePattern":"failed to create keyed iterable, got (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/input.go","lineNumber":239,"sourceCode":"func (v *multiMapValue) Init() error {\n\treturn nil\n}\n\nfunc (v *multiMapValue) Value() any {\n\treturn v.fn\n}\n\nfunc (v *multiMapValue) Reset() error {\n\treturn nil\n}\n\nfunc (v *multiMapValue) invoke(args []reflect.Value) []reflect.Value {\n\tif len(args) != 1 {\n\t\tpanic(fmt.Sprintf(\"wanted one key value, got %v\", args))\n\t}\n\trs, err := v.adapter.NewKeyedIterable(v.ctx, v.reader, v.w, args[0].Interface())\n\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"failed to create keyed iterable, got %v\", err))\n\t}\n\titer := makeIter(v.t.Out(0), rs)\n\titer.Init()\n\treturn []reflect.Value{reflect.ValueOf(iter.Value())}\n}\n","sourceCodeStart":221,"sourceCodeEnd":245,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/input.go#L221-L245","documentation":"After validating the key argument, multiMapValue.invoke calls SideInputAdapter.NewKeyedIterable to materialize the iterable for that key from the side input state reader. If that adapter call returns an error, the library panics because there is no way to propagate an error through the reflect-made function. The wrapped message includes the underlying cause.","triggerScenarios":"Reading a keyed iterable for a multimap side input fails — the StateReader cannot fetch the side input data (missing/failed side input materialization, runner-side state read error, wrong window), or the adapter rejects the key's type.","commonSituations":"Side input not materialized because the producing stage failed or was skipped; key type not comparable/encodable for the state cache; runner removed or truncated side input data; window mismatch so the requested window has no data.","solutions":["Read the wrapped cause in the panic message — fix the underlying NewKeyedIterable error first.","Verify the side input PCollection was actually produced (check upstream stage logs for failures).","Confirm the key passed to the multimap matches the side input's key type.","Check windowing: ensure the query window matches how the side input was materialized.","Enable runner/SDK side-input logging to see state read failures."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"defer func() {\n\tif r := recover(); r != nil {\n\t\tif s, ok := r.(string); ok && strings.HasPrefix(s, \"failed to create keyed iterable\") {\n\t\t\tlog.Fatalf(\"multimap side input read failed: %s\", s)\n\t\t}\n\t\tpanic(r)\n\t}\n}()","preventionTips":["Ensure the side input producing stage completes successfully before dependent stages run.","Verify side input key types match between producer and consumer.","Check windowing strategy compatibility between main input and side input.","Monitor runner logs for side input materialization failures."],"tags":["go","apache-beam","side-input","state-read"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}