{"record":{"id":"a2d4b810147419c8","repo":"hashicorp/nomad","slug":"job-summary-lookup-failed-v","errorCode":null,"errorMessage":"job_summary lookup failed: %v","messagePattern":"job_summary lookup failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store.go","lineNumber":2639,"sourceCode":"\ttxn := s.db.ReadTxn()\n\n\titer, err := txn.Get(\"job_summary\", \"id\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tws.Add(iter.WatchCh())\n\n\treturn iter, nil\n}\n\n// JobSummaryByPrefix is used to look up Job Summary by id prefix\nfunc (s *StateStore) JobSummaryByPrefix(ws memdb.WatchSet, namespace, id string) (memdb.ResultIterator, error) {\n\ttxn := s.db.ReadTxn()\n\n\titer, err := txn.Get(\"job_summary\", \"id_prefix\", namespace, id)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"job_summary lookup failed: %v\", err)\n\t}\n\n\tws.Add(iter.WatchCh())\n\n\treturn iter, nil\n}\n\n// UpsertCSIVolume inserts a volume in the state store.\nfunc (s *StateStore) UpsertCSIVolume(index uint64, volumes []*structs.CSIVolume) error {\n\ttxn := s.db.WriteTxnMsgT(structs.CSIVolumeRegisterRequestType, index)\n\tdefer txn.Abort()\n\n\tfor _, v := range volumes {\n\t\tif exists, err := s.namespaceExists(txn, v.Namespace); err != nil {\n\t\t\treturn err\n\t\t} else if !exists {\n\t\t\treturn fmt.Errorf(\"volume %s is in nonexistent namespace %s\", v.ID, v.Namespace)\n\t\t}","sourceCodeStart":2621,"sourceCodeEnd":2657,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store.go#L2621-L2657","documentation":"JobSummaryByPrefix reads job_summary rows matching an ID prefix via the id_prefix index. This error wraps a failed txn.Get on the job_summary table — the query itself failed, rather than simply matching nothing.","triggerScenarios":"Calling JobSummaryByPrefix (job summary list with prefix) when the memdb Get on 'job_summary'/'id_prefix' errors.","commonSituations":"Rare; internal index errors during job summary prefix queries via the Nomad API/CLI.","solutions":["Read the wrapped %v cause","Retry the query","If persistent, verify server state store health and report upstream"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"func isSummaryLookupErr(err error) bool {\n  return err != nil && strings.Contains(err.Error(), \"job_summary lookup failed\")\n}","tryCatchPattern":"sums, _, err := client.Jobs().PrefixList(prefix) // summary path via API\nif err != nil && isSummaryLookupErr(err) {\n  return retryWithBackoff()\n}","preventionTips":["Retry transient state store errors","Monitor server health","Handle empty prefix results explicitly"],"tags":["nomad","state-store","job-summary","prefix"],"backgroundTag":"state-store-read-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"}