{"record":{"id":"e2cd57b037747e00","repo":"hashicorp/nomad","slug":"failed-sve-lookup-s","errorCode":null,"errorMessage":"failed sve lookup: %s","messagePattern":"failed sve lookup: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store_variables.go","lineNumber":203,"sourceCode":"\tif ok {\n\t\t// If the existing index does not match the provided CAS index arg, then we\n\t\t// shouldn't update anything and can safely return early here.\n\t\tif sv.ModifyIndex != svEx.ModifyIndex {\n\t\t\treturn req.ConflictResponse(idx, svEx)\n\t\t}\n\t}\n\n\t// If we made it this far, we should perform the set.\n\treturn s.varSetTxn(tx, idx, req)\n}\n\n// varSetTxn is used to insert or update a variable in the state\n// store. It is the inner method used and handles only the actual storage.\nfunc (s *StateStore) varSetTxn(tx WriteTxn, idx uint64, req *structs.VarApplyStateRequest) *structs.VarApplyStateResponse {\n\tsv := req.Var\n\texistingRaw, err := tx.First(TableVariables, indexID, sv.Namespace, sv.Path)\n\tif err != nil {\n\t\treturn req.ErrorResponse(idx, fmt.Errorf(\"failed sve lookup: %s\", err))\n\t}\n\n\texisting, _ := existingRaw.(*structs.VariableEncrypted)\n\n\texistingQuota, err := tx.First(TableVariablesQuotas, indexID, sv.Namespace)\n\tif err != nil {\n\t\treturn req.ErrorResponse(idx, fmt.Errorf(\"variable quota lookup failed: %v\", err))\n\t}\n\n\tvar quotaChange int64\n\t// Set the CreateIndex and CreateTime\n\tif existing != nil {\n\n\t\t// If the variable is locked, it can only be updated by providing the correct\n\t\t// lock ID.\n\t\tif isLocked(existing.Lock, req) {\n\t\t\tzeroVal := &structs.VariableEncrypted{\n\t\t\t\tVariableMetadata: structs.VariableMetadata{","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store_variables.go#L185-L221","documentation":"Inside varSetTxn, the initial memdb read of the existing variable (namespace/path) failed; the wrapped lookup error aborts the plain variable set with an error response.","triggerScenarios":"Thrown at nomad/state/state_store_variables.go:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the variable set","Check server logs for memdb 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"}