Skip to content

Improve file write durability by properly handling sync errors #168

Description

@coderabbitai

Issue Description

Currently in src/interpreter/mod.rs, the write_file method in IoClient has a durability issue where sync_all() errors are silently ignored, potentially leading to data loss if the sync fails.

Current Problem

The current code swallows sync_all errors, so a failed fsync still reports success to the caller.

Proposed Solution

Replace the silent error handling with proper error propagation and fallback:

Context

This issue was identified during code review of PR #165 which enhanced file I/O durability features.

Related:

Impact: Data integrity issue where file writes may not be persisted to disk despite appearing successful.

Files affected: src/interpreter/mod.rs (write_file, append_file, close_file methods)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions