{"record":{"id":"5bfd19acc7b47220","repo":"hashicorp/nomad","slug":"unable-to-lookup-job-summary-for-job-id-q-in-name","errorCode":null,"errorMessage":"unable to lookup job summary for job id %q in namespace %q: %v","messagePattern":"unable to lookup job summary for job id %q in namespace %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":6058,"sourceCode":"\t\treturn err\n\t}\n\n\treturn nil\n}\n\n// updateSummaryWithAlloc updates the job summary when allocations are updated\n// or inserted\nfunc (s *StateStore) updateSummaryWithAlloc(index uint64, alloc *structs.Allocation,\n\texistingAlloc *structs.Allocation, txn *txn) error {\n\n\t// We don't have to update the summary if the job is missing\n\tif alloc.Job == nil {\n\t\treturn nil\n\t}\n\n\tsummaryRaw, err := txn.First(\"job_summary\", \"id\", alloc.Namespace, alloc.JobID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to lookup job summary for job id %q in namespace %q: %v\", alloc.JobID, alloc.Namespace, err)\n\t}\n\n\tif summaryRaw == nil {\n\t\t// Check if the job is de-registered\n\t\trawJob, err := txn.First(\"jobs\", \"id\", alloc.Namespace, alloc.JobID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"unable to query job: %v\", err)\n\t\t}\n\n\t\t// If the job is de-registered then we skip updating it's summary\n\t\tif rawJob == nil {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn fmt.Errorf(\"job summary for job %q in namespace %q is not present\", alloc.JobID, alloc.Namespace)\n\t}\n\n\t// Get a copy of the existing summary","sourceCodeStart":6040,"sourceCodeEnd":6076,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L6040-L6076","documentation":"Wraps a txn.First error when looking up the JobSummary for an allocation's job inside updateDeploymentWithAlloc / alloc summary update. This is a read failure (memdb error), distinct from the summary simply not existing, which is handled separately.","triggerScenarios":"Alloc update paths (client alloc updates, deployment health updates) where txn.First(\"job_summary\", \"id\", alloc.Namespace, alloc.JobID) returns an error.","commonSituations":"Alloc status updates arriving on servers under memdb stress; race with job GC is handled via nil check, so errors here are internal.","solutions":["Inspect the wrapped inner error for the memdb cause","Retry the alloc update (client heartbeats will resend)","Check server logs for state store health issues"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"unable to lookup job summary\") {\n    // alloc updates are re-sent by the client heartbeat; back off and retry\n    time.AfterFunc(time.Second, func() { retryAllocUpdate(alloc) })\n}","preventionTips":["Let Nomad clients' built-in heartbeat handle retries","Ensure sufficient server memory for memdb","Watch for state store errors in server logs"],"tags":["nomad","state-store","alloc","job-summary"],"backgroundTag":"state-store-txn-lookup-failed","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"}