{"record":{"id":"867773ebc83bbd5a","repo":"apache/beam","slug":"stage-v-no-parent-id-for-side-input-v","errorCode":null,"errorMessage":"stage[%v] no parent ID for side input %v","messagePattern":"stage\\[(.+?)\\] no parent ID for side input (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go","lineNumber":2596,"sourceCode":"\tcase isStatefulStage && len(ss.sides) == 0 && em.sawResidual.Load() && ss.hasBuildableDataLocked(upstreamW):\n\t\t// A stateful stage processes pending data at whatever the current\n\t\t// watermark is, so data alone makes it ready once something is self\n\t\t// checkpointing. Side input readiness comes from the watermark, so\n\t\t// stages that read one keep waiting.\n\tcase inputW == upstreamW && previousInputW == inputW:\n\t\t// Otherwise, use the progression of watermark to determine the bundle readiness.\n\t\tslog.Debug(\"bundleReady: unchanged upstream watermark\",\n\t\t\tslog.String(\"stage\", ss.ID),\n\t\t\tslog.Group(\"watermark\",\n\t\t\t\tslog.Any(\"upstream == input == previousInput\", inputW)))\n\t\treturn mtime.MinTimestamp, false, ptimeEventsReady, injectedReady\n\t}\n\n\tready := true\n\tfor _, side := range ss.sides {\n\t\tpID, ok := em.pcolParents[side.Global]\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"stage[%v] no parent ID for side input %v\", ss.ID, side))\n\t\t}\n\t\tparent, ok := em.stages[pID]\n\t\tif !ok {\n\t\t\tpanic(fmt.Sprintf(\"stage[%v] no parent for side input %v, with parent ID %v\", ss.ID, side, pID))\n\t\t}\n\t\tow := parent.OutputWatermark()\n\t\tif upstreamW > ow {\n\t\t\tready = false\n\t\t}\n\t}\n\treturn upstreamW, ready, ptimeEventsReady, injectedReady\n}\n\n// processingTimeNow gives the current processing time for the runner.\nfunc (em *ElementManager) processingTimeNow() (ret mtime.Time) {\n\tif em.testStreamHandler != nil && !em.testStreamHandler.completed {\n\t\treturn em.testStreamHandler.Now()\n\t}","sourceCodeStart":2578,"sourceCodeEnd":2614,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/prism/internal/engine/elementmanager.go#L2578-L2614","documentation":"Before a stage with side inputs can run, Prism checks readiness by looking up each side input's parent PCollection in em.pcolParents. If a side input's PCollection has no registered parent stage, the pipeline graph is inconsistent — the side input cannot be evaluated because its producing stage is unknown. The runner panics naming the stage and the side input.","triggerScenarios":"em.pcolParents lacks an entry for side.Global when checking side-input readiness, i.e. the PCollection feeding the side input was never registered as the output of a stage — usually a pipeline-construction/translation bug or an unsupported side-input wiring pattern.","commonSituations":"Side inputs whose producing transform was fused away or not materialized, AsView/View.AsMap usages on PCollections that prism failed to link, cross-language pipeline fragments where the side input producer lives in another runner component.","solutions":["Check how the side input PCollection is produced; ensure it comes from a materializable transform (e.g. an explicit GBK or DoFn stage)","Try materializing the side input with an intermediate identity transform or GBK so prism registers a parent stage","Simplify or replace exotic side-input patterns (e.g. side inputs of side inputs) with supported ones","Upgrade to the latest Beam version; prism side-input handling has improved over releases","If it persists, file an issue with the pipeline graph — this indicates a prism translation bug"],"exampleFix":"// before: side input from a transform prism cannot parent\nside := beam.SideInput{Input: viewOfUnmaterializedPColl}\n// after: force materialization via a view over a GBK-backed PCollection\nsideInput := beam.SideInput{Input: view.AsList(s, materializedPColl)}","handlingStrategy":"fallback","validationCode":"if _, ok := pcolParents[side.Global]; !ok {\n    return fmt.Errorf(\"side input %v has no producing stage registered\", side.Global)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Produce side inputs from standard, materializable transforms","Avoid exotic side-input topologies (views over unmaterialized PCollections)","Keep prism updated; side-input translation improves each release"],"tags":["go","beam","prism","side-input","panic"],"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"}