{"record":{"id":"5210221cf88c1974","repo":"apache/beam","slug":"may-only-have-a-single-sdf-rtracker-parameter-and-it-must","errorCode":null,"errorMessage":"may only have a single sdf.RTracker parameter and it must precede the main input parameter","messagePattern":"may only have a single sdf\\.RTracker parameter and it must precede the main input parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/funcx/fn.go","lineNumber":535,"sourceCode":"\t}\n\t// Validate the return value ordering.\n\tretState := rsStart\n\tfor i, r := range u.Ret {\n\t\tif retState, err = nextRetState(retState, r.Kind); err != nil {\n\t\t\treturn errors.WithContextf(err, \"validating return value %d for %s\", i, u.Fn.Name())\n\t\t}\n\t}\n\treturn nil\n}\n\nvar (\n\terrContextParam                      = errors.New(\"may only have a single context.Context parameter and it must be the first parameter\")\n\terrPaneParamPrecedence               = errors.New(\"may only have a single PaneInfo parameter and it must precede the WindowParam, EventTime and main input parameter\")\n\terrWindowParamPrecedence             = errors.New(\"may only have a single Window parameter and it must precede the EventTime and main input parameter\")\n\terrEventTimeParamPrecedence          = errors.New(\"may only have a single beam.EventTime parameter and it must precede the main input parameter\")\n\terrWatermarkEstimatorParamPrecedence = errors.New(\"may only have a single sdf.WatermarkEstimator parameter and it must precede the main input parameter\")\n\terrReflectTypePrecedence             = errors.New(\"may only have a single reflect.Type parameter and it must precede the main input parameter\")\n\terrRTrackerPrecedence                = errors.New(\"may only have a single sdf.RTracker parameter and it must precede the main input parameter\")\n\terrBundleFinalizationPrecedence      = errors.New(\"may only have a single BundleFinalization parameter and it must precede the main input parameter\")\n\terrStateProviderPrecedence           = errors.New(\"may only have a single state.Provider parameter and it must precede the main input parameter\")\n\terrTimerProviderPrecedence           = errors.New(\"may only have a single timer.Provider parameter and it must precede the main input parameter\")\n\terrInputPrecedence                   = errors.New(\"inputs parameters must precede emit function parameters\")\n)\n\ntype paramState int\n\nconst (\n\tpsStart paramState = iota\n\tpsContext\n\tpsPane\n\tpsWindow\n\tpsEventTime\n\tpsWatermarkEstimator\n\tpsType\n\tpsInput\n\tpsOutput","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/funcx/fn.go#L517-L553","documentation":"Sentinel error errRTrackerPrecedence from the funcx signature validator: an sdf.RTracker (restriction tracker) parameter appeared after the main input or the allowed pre-input parameters, or was duplicated. For splittable DoFns the single sdf.RTracker parameter must precede the main element input.","triggerScenarios":"Thrown at sdks/go/pkg/beam/core/funcx/fn.go:535 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move the sdf.RTracker parameter before the main input parameter","Ensure only one RTracker parameter is declared"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}