{"record":{"id":"2875b40d7f55679d","repo":"apache/beam","slug":"restriction-tracker-missing","errorCode":null,"errorMessage":"Restriction tracker missing.","messagePattern":"Restriction tracker missing\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/sdf.go","lineNumber":678,"sourceCode":"// each case occurs and the implementation details, see the documentation for\n// the singleWindowSplit and multiWindowSplit methods.\nfunc (n *ProcessSizedElementsAndRestrictions) Split(ctx context.Context, f float64) ([]*FullValue, []*FullValue, error) {\n\t// Get the watermark state immediately so that we don't overestimate our current watermark.\n\trWeState := n.wesInv.Invoke(n.PDo.we)\n\tpWeState := rWeState\n\t// If we've processed elements, the initial watermark estimator state will be set.\n\t// In that case we should hold the output watermark at that initial state so that we don't\n\t// Advance past where the current elements are holding the watermark\n\tif n.initWeS != nil {\n\t\tpWeState = n.initWeS\n\t}\n\taddContext := func(err error) error {\n\t\treturn errors.WithContext(err, \"Attempting split in ProcessSizedElementsAndRestrictions\")\n\t}\n\n\t// Errors checking.\n\tif n.rt == nil {\n\t\treturn nil, nil, addContext(errors.New(\"Restriction tracker missing.\"))\n\t}\n\tif err := n.rt.GetError(); err != nil {\n\t\treturn nil, nil, addContext(err)\n\t}\n\n\t// Split behavior differs depending on whether this is a window-observing\n\t// DoFn or not.\n\tif len(n.elm.Windows) > 1 {\n\t\tp, r, err := n.multiWindowSplit(ctx, f, pWeState, rWeState)\n\t\tif err != nil {\n\t\t\treturn nil, nil, addContext(err)\n\t\t}\n\t\treturn p, r, nil\n\t}\n\n\t// Not window-observing, or window-observing but only one window.\n\tp, r, err := n.singleWindowSplit(ctx, f, pWeState, rWeState)\n\tif err != nil {","sourceCodeStart":660,"sourceCodeEnd":696,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/sdf.go#L660-L696","documentation":"ProcessSizedElementsAndRestrictions.Split performs a dynamic split of pending elements and restrictions, which requires the node's restriction tracker to be initialized. When n.rt is nil the node was never claimed/started, so Split returns this error wrapped with context about the split attempt.","triggerScenarios":"Calling Split (typically via Checkpoint) on a ProcessSizedElementsAndRestrictions node whose restriction tracker field n.rt is still nil — i.e., splitting before any element processing initialized the tracker.","commonSituations":"Checkpointing a splittable stage before it has processed its first element; runner-side autoscaling/fission logic splitting freshly created SDF nodes; custom harness code invoking split during startup races.","solutions":["Only split/checkpoint after the SDF node has started processing and the tracker is set.","Check rt != nil (or GetError) before invoking Split from runner-side code.","Retry the split later once the bundle is actively processing."],"exampleFix":"// before\nif err := node.Split(fraction); err != nil { ... }\n// after\nif node.RTracker() == nil { return /* not yet splittable */ }\nif err := node.Split(fraction); err != nil { ... }","handlingStrategy":"validation","validationCode":"if node == nil || node.RTracker() == nil { return errors.New(\"cannot split: restriction tracker not initialized\") }","typeGuard":"func splittable(n *exec.ProcessSizedElementsAndRestrictions) bool { return n != nil && n.RTracker() != nil }","tryCatchPattern":"res, pending, err := node.Split(fraction)\nif err != nil && strings.Contains(err.Error(), \"Restriction tracker missing\") {\n    // node not started yet: defer or retry the split\n}","preventionTips":["Only issue splits/checkpoints for bundles already processing elements","Check tracker readiness before runner-side autoscaling splits","Order harness teardown so splits never race with node initialization"],"tags":["go","apache-beam","sdf","split","checkpoint"],"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"}