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

test: use snapshots for detecting segment removal #5812

Merged
merged 4 commits into from
Aug 31, 2022

Commits on Aug 3, 2022

  1. tests: store node name in NodeStorage util

    Store the name of the respective node in the NodeStorage test util
    class. This enables a future commit to produce a cluster-level segment
    snapshot.
    Vlad Lazar committed Aug 3, 2022
    Configuration menu
    Copy the full SHA
    9a13885 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. tests: expose cluster level segment snapshot

    This commit extends the test util storage classes to provide a cluster
    level snapshot of the segments for one partition.
    Vlad Lazar committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    6887c1b View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. test: add alternate wait util for segment removal

    This commit introduces a new test utility for waiting for the removal
    of a partition's segments, wait_for_removal_of_n_segments. It
    periodically request a snapshot of the segments associated with a given
    partition and compares it with the provided original snapshot.
    
    As opposed to wait_for_removal_of_segments, its result is not impacted
    by newly created segments. This means that it can be safely used in
    contexts that produce simulated failures (each failure causes the
    current segment to roll).
    Vlad Lazar committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    5601891 View commit details
    Browse the repository at this point in the history
  2. tests/si: use snapshots to find removed segments

    Previously, the shadow indexing end-to-end asserted against the current
    number of segments when checking for segment removal. This approach has
    the downside that a restart/failure of a redpanda node causes a segment
    roll, which makes the assertion unreliable in a context with simulated
    failures.
    
    This commit changes the assertion to use the
    wait_for_removal_of_n_segments helper method which uses segment
    snapshots to determine how many segments were removed. The change
    deflakes the test against a high number of injected node failures.
    Vlad Lazar committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    3f1cb7f View commit details
    Browse the repository at this point in the history