{"record":{"id":"093177a536f9f149","repo":"weaviate/weaviate","slug":"file-snapshot-store-w","errorCode":null,"errorMessage":"file snapshot store: %w","messagePattern":"file snapshot store: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cluster/store.go","lineNumber":565,"sourceCode":"\t\treturn fmt.Errorf(\"mkdir %s: %w\", st.cfg.WorkDir, err)\n\t}\n\n\t// log store\n\tst.logStore, err = raftbolt.NewBoltStore(filepath.Join(st.cfg.WorkDir, raftDBName))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"bolt db: %w\", err)\n\t}\n\n\t// log cache\n\tst.logCache, err = raft.NewLogCache(logCacheCapacity, st.logStore)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"log cache: %w\", err)\n\t}\n\n\t// file snapshot store\n\tst.snapshotStore, err = raft.NewFileSnapshotStore(st.cfg.WorkDir, nRetainedSnapShots, st.log.Out)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"file snapshot store: %w\", err)\n\t}\n\n\t// tcp transport\n\tadvertiseAddress := net.JoinHostPort(st.cfg.Host, fmt.Sprintf(\"%d\", st.cfg.RaftPort))\n\ttcpAddr, err := net.ResolveTCPAddr(\"tcp\", advertiseAddress)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"net.resolve tcp address=%v: %w\", advertiseAddress, err)\n\t}\n\n\tbindAddress := net.JoinHostPort(st.cfg.BindAddr, fmt.Sprintf(\"%d\", st.cfg.RaftPort))\n\tst.raftTransport, err = st.raftResolver.NewTCPTransport(bindAddress, tcpAddr, tcpMaxPool, tcpTimeout, st.log)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"raft transport address=%v tcpAddress=%v maxPool=%v timeOut=%v: %w\", bindAddress, tcpAddr, tcpMaxPool, tcpTimeout, err)\n\t}\n\tst.log.WithFields(logrus.Fields{\n\t\t\"action\":                 \"raft_tcp_transport\",\n\t\t\"raft_bind_address\":      bindAddress,\n\t\t\"raft_advertise_address\": advertiseAddress,","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/cluster/store.go#L547-L583","documentation":"raft.NewFileSnapshotStore creates the directory and retention policy for RAFT snapshots (nRetainedSnapShots kept); failure is wrapped as 'file snapshot store: %w'. Snapshots are required for log compaction and fast restarts, so startup cannot proceed without it.","triggerScenarios":"Cannot create/read the snapshots subdirectory under WorkDir; permission denied; disk full; too many/invalid existing snapshot files; invalid retention count.","commonSituations":"Snapshot dir partially deleted or corrupted after crash; read-only volume; inode/space exhaustion; backups restored without the snapshots dir permissions.","solutions":["Inspect/fix permissions on the raft work dir and its snapshots subdirectory","Free disk space and check inodes (df -i)","Remove corrupted leftover snapshot files if the node can resync from peers","Ensure nRetainedSnapShots (snapshot retention) is a sane positive value in source/config","Restore the whole RAFT dir from a consistent backup rather than partial copy"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// pre-check snapshot dir\nsnapDir := filepath.Join(workDir, \"snapshots\")\nif err := os.MkdirAll(snapDir, 0o755); err != nil { exit }\nif unix.Access(snapDir, unix.W_OK) != nil { exit }","typeGuard":null,"tryCatchPattern":"if err := raft.NewFileSnapshotStore(workDir, nRetainedSnapShots, logOut); err != nil {\n    log.Fatalf(\"file snapshot store: %v — check dir perms, disk space, corrupt snapshots in %s\", err, workDir)\n}","preventionTips":["Monitor free space and inodes on the raft volume","Preserve the snapshots dir in backups/restores","Fix ownership after restoring data from archives","Keep retention count at a sane default"],"tags":["raft","snapshot","filesystem"],"backgroundTag":"snapshot-store-failed","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}