{"record":{"id":"2f88c4f8783aef98","repo":"juicedata/juicefs","slug":"new-session-s-2f88c4","errorCode":null,"errorMessage":"new session: %s","messagePattern":"new session: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/meta/tkv.go","lineNumber":648,"sourceCode":"\t\t\tatomic.StoreInt64(&m.usedSpace, v)\n\t\t} else {\n\t\t\tlogger.Warnf(\"Update space stats: %s\", err)\n\t\t}\n\t}\n\tif inodes := atomic.LoadInt64(&m.newInodes); inodes != 0 {\n\t\tif v, err := m.incrCounter(totalInodes, inodes); err == nil {\n\t\t\tatomic.AddInt64(&m.newInodes, -inodes)\n\t\t\tatomic.StoreInt64(&m.usedInodes, v)\n\t\t} else {\n\t\t\tlogger.Warnf(\"Update inodes stats: %s\", err)\n\t\t}\n\t}\n}\n\nfunc (m *kvMeta) doNewSession(sinfo []byte, update bool) error {\n\tif !m.getFormat().ChangeLog {\n\t\tif err := m.setValue(m.sessionKey(m.sid), m.packInt64(m.expireTime())); err != nil {\n\t\t\treturn fmt.Errorf(\"new session: %s\", err)\n\t\t}\n\t\tif err := m.setValue(m.sessionInfoKey(m.sid), sinfo); err != nil {\n\t\t\treturn fmt.Errorf(\"new session: %s\", err)\n\t\t}\n\t\treturn nil\n\t}\n\terr := m.txn(Background(), func(tx *kvTxn) error {\n\t\ttx.set(m.sessionKey(m.sid), m.packInt64(m.expireTime()))\n\t\ttx.set(m.sessionInfoKey(m.sid), sinfo)\n\t\tm.genLog(tx, time.Now(), \"NEWSESSION(%d,%d,%s)\", m.sid, m.expireTime(), logEncode(sinfo))\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"new session: %s\", err)\n\t}\n\treturn nil\n}\n","sourceCodeStart":630,"sourceCodeEnd":666,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/meta/tkv.go#L630-L666","documentation":"Returned by kvMeta.doNewSession when writing the session key with its expiry timestamp to the KV store fails. The client cannot register its session (needed for sustained inodes and locks), so session setup aborts; the wrapped error comes from the KV client.","triggerScenarios":"Thrown at pkg/meta/tkv.go:648 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check KV store health and network connectivity","Retry mounting once transient store issues resolve"],"exampleFix":null,"handlingStrategy":"retry","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"}