Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pebble: add global sync to MemFS #3110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 28, 2023

  1. pebble: add global sync to MemFS

    This commit introduces MemFS.Sync method which persists the entire
    filesystem. It makes it possible to emulate a process crash and restart,
    as follows:
    
    ```
    fs.Sync()                        // capture/snapshot the filesystem
    fs.SetIgnoreSyncs(true)          // prevent changes from taking effect
    db.Close()                       // shutdown, with no writes taking effect
    fs.ResetToSyncedState()          // rollback to the snapshot
    strictFS.SetIgnoreSyncs(false)   // allow changes again
    db = Open(..., &Options{FS: fs}) // reopen on top of the reverted data
    ```
    pav-kv committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    22db032 View commit details
    Browse the repository at this point in the history