{"record":{"id":"fc5bb5fb03052534","repo":"rqlite/rqlite","slug":"syncing-store-dir-w","errorCode":null,"errorMessage":"syncing store dir: %w","messagePattern":"syncing store dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"snapshot/store.go","lineNumber":668,"sourceCode":"\tif err := plan.WriteToFile(p, s.reapPlanPath); err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"writing reap plan: %w\", err)\n\t}\n\n\treturn s.executeReapPlan(p, s.reapPlanPath)\n}\n\n// executeReapPlan executes a reap plan and cleans up.\nfunc (s *Store) executeReapPlan(p *plan.Plan, planPath string) (int, int, error) {\n\tstartT := time.Now()\n\tdefer recordDuration(reapExecuteDuration, startT)\n\n\texecutor := plan.NewExecutor()\n\tif err := p.Execute(executor); err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"executing reap plan: %w\", err)\n\t}\n\n\tif err := fsutil.SyncDirMaybe(s.dir); err != nil {\n\t\treturn 0, 0, fmt.Errorf(\"syncing store dir: %w\", err)\n\t}\n\n\t// Clean up the plan file.\n\tos.Remove(planPath)\n\treturn p.NReaped, p.NCheckpointed, nil\n}\n\n// signalReap sends a non-blocking signal to the reaper goroutine.\nfunc (s *Store) signalReap() {\n\tselect {\n\tcase s.reapCh <- struct{}{}:\n\tdefault:\n\t}\n}\n\n// DueNext returns the type of snapshot due next.\nfunc (s *Store) DueNext() (Type, error) {\n\tif fsutil.FileExists(s.fullNeededPath) {","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/rqlite/rqlite/blob/7586a4d1bdbd9a5a80021664c5a863cd850adb60/snapshot/store.go#L650-L686","documentation":"After executing the reap plan, executeReapPlan calls fsutil.SyncDirMaybe on the snapshot store directory to make deletions/renames durable; the sync failed, wrapped via %w. The reap operations likely succeeded but durability is unconfirmed, so the error is propagated.","triggerScenarios":"Thrown at snapshot/store.go:668 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check filesystem/disk health for the snapshot store directory","Verify snapshots are intact after the failure; the plan file persistence guards recovery","Retry the operation or restart the node to reconcile state"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7586a4d1bdbd9a5a80021664c5a863cd850adb60","analyzedAt":"2026-09-03T07:03:02.260Z","contentChangedAt":"2026-09-03T07:03:02.260Z","schemaVersion":2},"datasetVersion":"2026-09-10T12:17:11.382Z"}