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

Post restore reset #545

Merged
merged 11 commits into from
Mar 17, 2023
Merged

Post restore reset #545

merged 11 commits into from
Mar 17, 2023

Commits on Mar 12, 2023

  1. Introduce MonotonicLogStore interface

    This commit introduces an interface which acts as a handler for a leaky
    abstraction in the structure of underlying log stores. In order to
    properly handle post-snapshot-restore cleanup for log stores
    generically, we need some awareness of whether the underlying store
    permits gaps.
    
    Boltdb allows for gaps in log store indices, but to handle them it
    requires a freelist, which is written on every commit. This is costly,
    particularly when the freelist is large. By completely resetting the
    LogStore after snapshot, we grow the size of the freelist, which would
    result in performance degradation.
    
    The MonotonicLogStore interface is implemented by LogStores with
    guarantees of sequential/monotonic indices, like raft-wal, but reverts
    to the old behavior for boltdb.
    
    This also requires special handling within LogStore wrappers (like
    LogCache), to ensure that the type assertion is passed to the underlying
    store.
    mpalmi committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    ec7349b View commit details
    Browse the repository at this point in the history
  2. Reset old logs after snapshot restore

    This commit makes use MonotonicLogStore type assertion to delete all
    entries from the LogStore after snapshot restore.
    mpalmi committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    f10b599 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. Apply suggestions from code review for doc strings of StoreLogs and M…

    …onotonicLogStore
    
    Co-authored-by: Paul Banks <banks@banksco.de>
    jmurret and banks committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    6a0fb47 View commit details
    Browse the repository at this point in the history
  2. remove deletion of logs from restore on startup code path. update tes…

    …t to ensure logs are not deleted.
    jmurret committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    dd08310 View commit details
    Browse the repository at this point in the history
  3. fmt log.go to pass CI

    jmurret committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    ca621fc View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. Fix incorrect log message

    banks committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    0f08583 View commit details
    Browse the repository at this point in the history
  2. Verifying raft logs removal vs non-removal for monotonic and non-mono…

    …tic during user restore.
    jmurret committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    fc09cbd View commit details
    Browse the repository at this point in the history
  3. assert log removal/non-removal across all raft nodes, not just leader…

    …. re-use monotonic cluster options in test.
    jmurret committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    7d73c13 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. Apply suggestions from code review for doc strings for DeleteLogs

    Co-authored-by: Paul Banks <banks@banksco.de>
    jmurret and banks committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    4e27599 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c12c1a2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fdcb70b View commit details
    Browse the repository at this point in the history