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

Remove PRRLs before performing file-based recovery #43928

Commits on Jul 3, 2019

  1. Remove PRRLs before performing file-based recovery

    If the primary performs a file-based recovery to a node that has (or recently
    had) a copy of the shard then it is possible that the persisted global
    checkpoint of the new copy is behind that of the old copy since file-based
    recoveries are somewhat destructive operations.
    
    Today we leave that node's PRRL in place during the recovery with the
    expectation that it can be used by the new copy. However this isn't the case if
    the new copy needs more history to be retained, because retention leases may
    only advance and never retreat.
    
    This commit addresses this by removing any existing PRRL during a file-based
    recovery: since we are performing a file-based recovery we have already
    determined that there isn't enough history for an ops-based recovery, so there
    is little point in keeping the old lease in place.
    
    Caught by [a failure of `RecoveryWhileUnderLoadIT.testRecoverWhileRelocating`](https://scans.gradle.com/s/wxccfrtfgjj3g/console-log?task=:server:integTest#L14)
    
    Relates elastic#41536
    DaveCTurner committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    0a0604b View commit details
    Browse the repository at this point in the history
  2. Stronger assertion: if the checkpoint was reset then it's gone all th…

    …e way back to SequenceNumbers.UNASSIGNED_SEQ_NO
    DaveCTurner committed Jul 3, 2019
    Configuration menu
    Copy the full SHA
    6a58312 View commit details
    Browse the repository at this point in the history