{"record":{"id":"de12a5f0a481cfad","repo":"hashicorp/nomad","slug":"followup-eval-lookup-failed-v","errorCode":null,"errorMessage":"followup eval lookup failed: %v","messagePattern":"followup eval lookup failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":4208,"sourceCode":"\n\tcopyAlloc.FollowupEvalID = \"\"\n\n\tallJobAllocs, err := s.AllocsByJob(nil, alloc.Namespace, alloc.JobID, true)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not lookup allocs: %w\", err)\n\t}\n\n\tfor _, jobAlloc := range allJobAllocs {\n\t\tif jobAlloc.ID != copyAlloc.ID && jobAlloc.FollowupEvalID == evalID && !jobAlloc.TerminalStatus() {\n\t\t\t// follow-up eval was created for multiple non-terminal allocs in\n\t\t\t// the job at the same time, so we leave it alone\n\t\t\treturn nil\n\t\t}\n\t}\n\n\traw, err := txn.First(\"evals\", \"id\", evalID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"followup eval lookup failed: %v\", err)\n\t}\n\tif raw == nil {\n\t\treturn nil // eval was deleted by user\n\t}\n\teval := raw.(*structs.Evaluation)\n\teval = eval.Copy()\n\teval.Status = structs.EvalStatusCancelled\n\teval.StatusDescription = \"allocs reconnected\"\n\teval.ModifyIndex = index\n\terr = txn.Insert(\"evals\", eval)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := txn.Insert(\"index\", &IndexEntry{\"evals\", index}); err != nil {\n\t\treturn fmt.Errorf(\"index update failed: %v\", err)\n\t}\n\treturn nil\n}","sourceCodeStart":4190,"sourceCodeEnd":4226,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L4190-L4226","documentation":"While cancelling a reconnect follow-up eval, the memdb read of that eval by ID failed; the wrapped txn.First error prevents completing the cancellation.","triggerScenarios":"Thrown at nomad/state/state_store.go:4208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the allocation update","Inspect server logs for eval table read errors"],"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"}