{"record":{"id":"ac0f5b39d9173096","repo":"apache/beam","slug":"invalid-status-for-combine-convert-v-v","errorCode":null,"errorMessage":"invalid status for combine convert %v: %v","messagePattern":"invalid status for combine convert (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/combine.go","lineNumber":655,"sourceCode":"\tif err != nil {\n\t\treturn n.fail(err)\n\t}\n\treturn n.Out.ProcessElement(n.Combine.ctx, &FullValue{Windows: value.Windows, Elm: value.Elm, Elm2: out, Timestamp: value.Timestamp})\n}\n\n// ConvertToAccumulators is an executor for converting an input value to an accumulator value.\ntype ConvertToAccumulators struct {\n\t*Combine\n}\n\nfunc (n *ConvertToAccumulators) String() string {\n\treturn fmt.Sprintf(\"ConvertToAccumulators[%v] Keyed:%v Out:%v\", path.Base(n.Fn.Name()), n.UsesKey, n.Out.ID())\n}\n\n// ProcessElement accepts an input value and returns an accumulator containing that one value.\nfunc (n *ConvertToAccumulators) ProcessElement(ctx context.Context, value *FullValue, values ...ReStream) error {\n\tif n.status != Active {\n\t\treturn errors.Errorf(\"invalid status for combine convert %v: %v\", n.UID, n.status)\n\t}\n\tn.Combine.states.Set(n.Combine.ctx, metrics.StartBundle)\n\ta, err := n.newAccum(n.Combine.ctx, value.Elm)\n\tif err != nil {\n\t\treturn n.fail(err)\n\t}\n\n\tfirst := true\n\ta, err = n.addInput(n.Combine.ctx, a, value.Elm, value.Elm2, value.Timestamp, first)\n\tif err != nil {\n\t\treturn n.fail(err)\n\t}\n\treturn n.Out.ProcessElement(n.Combine.ctx, &FullValue{Windows: value.Windows, Elm: value.Elm, Elm2: a, Timestamp: value.Timestamp})\n}\n","sourceCodeStart":637,"sourceCodeEnd":670,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/combine.go#L637-L670","documentation":"ConvertToAccumulators.ProcessElement (which wraps a single input value into an accumulator) requires the node to be Active inside a started bundle. Any other status means ProcessElement was called out of lifecycle order.","triggerScenarios":"Calling ConvertToAccumulators.ProcessElement before StartBundle or after FinishBundle.","commonSituations":"Tests invoking the convert node directly; runners resuming data flow after a bundle finished without restarting it.","solutions":["Ensure the full lifecycle (Up, StartBundle, ProcessElement, FinishBundle) is observed.","Restart the bundle before feeding more values after FinishBundle.","Check for error paths that skip StartBundle but continue processing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := convert.ProcessElement(ctx, fv, values); err != nil {\n\tif strings.Contains(err.Error(), \"invalid status for combine convert\") {\n\t\t// ensure convert node is inside an active bundle\n\t}\n\treturn err\n}","preventionTips":["Feed values only between StartBundle and FinishBundle.","Avoid reusing finished nodes without re-running the lifecycle.","Let the plan executor manage node status rather than manual calls."],"tags":["go","beam","lifecycle","state-machine","combine"],"backgroundTag":"invalid-state-transition","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"}