{"record":{"id":"24125727d58f6787","repo":"nats-io/nats-server","slug":"no-impl","errorCode":null,"errorMessage":"no impl","messagePattern":"no impl","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/memstore.go","lineNumber":2640,"sourceCode":"\tms.mu.Unlock()\n\treturn nil\n}\n\nfunc (ms *memStore) Consumers() iter.Seq[ConsumerStore] {\n\treturn func(yield func(ConsumerStore) bool) {\n\t\tms.mu.RLock()\n\t\tdefer ms.mu.RUnlock()\n\n\t\tfor _, v := range ms.consumers {\n\t\t\tif !yield(v) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc (ms *memStore) Snapshot(_ time.Duration, _, _ bool) (*SnapshotResult, error) {\n\treturn nil, fmt.Errorf(\"no impl\")\n}\n\n// Binary encoded state snapshot, >= v2.10 server.\nfunc (ms *memStore) EncodedStreamState(failed uint64, withSources bool) ([]byte, error) {\n\tms.mu.RLock()\n\tdefer ms.mu.RUnlock()\n\n\twithSources = withSources && len(ms.sources) > 0\n\tversion := streamStateVersion\n\n\t// Quick calculate num deleted.\n\tnumDeleted := int((ms.state.LastSeq - ms.state.FirstSeq + 1) - ms.state.Msgs)\n\tif numDeleted < 0 {\n\t\tnumDeleted = 0\n\t}\n\n\t// Encoded is Msgs, Bytes, FirstSeq, LastSeq, Failed, NumDeleted and optional DeletedBlocks.\n\t// Calculate the exact encoded size up front so the buffer is allocated once.","sourceCodeStart":2622,"sourceCodeEnd":2658,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/memstore.go#L2622-L2658","documentation":"memStore.Snapshot is not implemented for the memory store, so any request for a stream state snapshot (used by mirror/source replication and backups) on a memory-backed stream fails immediately with this sentinel-style error.","triggerScenarios":"Thrown at server/memstore.go:2640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a file-backed stream when snapshot support is required","Use EncodedStreamState instead, which memory stores do implement"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}