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

FileStorage: fix rare data corruption when using restore after multiple undos #395

Commits on Jan 31, 2024

  1. FileStorage: fix data corruption when using restore after multiple undos

    The case of a history like this:
     - T0 initialize an object in state 0
     - T1 modifies object to state 1
     - T2 modifies object to state 2
     - T3 undo T2 and T1, bringing back to state 0
     - T4 modified object to state 3
     - T5 undo T4, bringing back object to state 0
    
    was not correct after `restore`: the state is 1 instead of the expected 0.
    
    This is because T3 contains two data records:
     - an undo of T2, with a backpointer to the data of state 1
     - an undo of T1, with a backpointer to the data of state 0
    When restoring T5 (the undo of T4), the transaction is made of one data
    record, with a backpointer that is copied from the backpointer from T3,
    but this uses backpointer from the first record for this object, which
    is incorrect, in such a case where there is more than one backpointer
    for the same oid, we need to iterate in all data record to find the
    oldest version.
    perrinjerome committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    44d36b0 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. alternate implementation from review

    Co-authored-by: Kirill Smelkov <kirr@nexedi.com>
    perrinjerome and navytux committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    37db547 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Configuration menu
    Copy the full SHA
    ae6bdd0 View commit details
    Browse the repository at this point in the history