{"record":{"id":"d297db419f709b94","repo":"juicedata/juicefs","slug":"session-not-found-d-d297db","errorCode":null,"errorMessage":"session not found: %d","messagePattern":"session not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/meta/tkv.go","lineNumber":863,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn &s, nil\n}\n\nfunc (m *kvMeta) GetSession(sid uint64, detail bool) (*Session, error) {\n\tvar legacy bool\n\tvalue, err := m.get(m.sessionKey(sid))\n\tif err == nil && value == nil {\n\t\tlegacy = true\n\t\tvalue, err = m.get(m.legacySessionKey(sid))\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif value == nil {\n\t\treturn nil, fmt.Errorf(\"session not found: %d\", sid)\n\t}\n\ts, err := m.getSession(sid, detail)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\ts.Expire = time.Unix(m.parseInt64(value), 0)\n\tif legacy {\n\t\ts.Expire = s.Expire.Add(time.Minute * 5)\n\t}\n\treturn s, nil\n}\n\nfunc (m *kvMeta) ListSessions() ([]*Session, error) {\n\tctx := Background()\n\tvals, err := m.scanValues(ctx, m.fmtKey(\"SE\"), -1, nil)\n\tif err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":845,"sourceCodeEnd":881,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/meta/tkv.go#L845-L881","documentation":"GetSession found neither the current session key nor the legacy session key in the KV store (both reads returned nil). The requested session ID has expired, been removed by session cleanup, or never existed.","triggerScenarios":"Thrown at pkg/meta/tkv.go:863 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use `juicefs status` to list live session ids","Re-check the session id; expired sessions cannot be queried"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}