{"record":{"id":"d8122d993295f723","repo":"hashicorp/nomad","slug":"evaluation-already-exists","errorCode":null,"errorMessage":"evaluation already exists","messagePattern":"evaluation already exists","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/eval_endpoint.go","lineNumber":355,"sourceCode":"\n\t// Verify the parent evaluation is outstanding, and that the tokens match.\n\tif err := e.srv.evalBroker.OutstandingReset(eval.PreviousEval, args.EvalToken); err != nil {\n\t\treturn err\n\t}\n\n\t// Look for the eval\n\tsnap, err := e.srv.fsm.State().Snapshot()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tws := memdb.NewWatchSet()\n\tout, err := snap.EvalByID(ws, eval.ID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif out != nil {\n\t\treturn fmt.Errorf(\"evaluation already exists\")\n\t}\n\n\t// Update via Raft\n\t_, index, err := e.srv.raftApply(structs.EvalUpdateRequestType, args)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Update the index\n\treply.Index = index\n\treturn nil\n}\n\n// Reblock is used to reinsert an existing blocked evaluation into the blocked\n// evaluation tracker.\nfunc (e *Eval) Reblock(args *structs.EvalUpdateRequest, reply *structs.GenericResponse) error {\n\taclObj, err := e.srv.AuthenticateServerOnly(e.ctx, args)\n\te.srv.MeasureRPCRate(\"eval\", structs.RateMetricWrite, args)","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/eval_endpoint.go#L337-L373","documentation":"Fires in Eval.Create when an evaluation with the same ID already exists in the state store; the parent eval's scheduler produced a duplicate ID, and re-applying it would clobber state.","triggerScenarios":"Thrown at nomad/eval_endpoint.go:355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the scheduling run so a fresh eval ID is generated","Check for a server-side scheduler loop resubmitting the same eval"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}