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

cloud_storage/tests: adjust delta for restored partitions #5372

Commits on Jul 8, 2022

  1. cloud_storage/tests: adjust delta for restored partitions

    when asserting that the size of a restored partition is close to the
    original partition in topic recovery tests, we use the default segment
    size and a multiplier of 1.5 to tolerate errors where the last segment
    of the ntp is not uploaded to tiered storage because it is open.
    
    sometimes the segment is larger than 1.5x the default size causing an
    assertion failure in the test. this change stores the last segment size
    for each partition and uses it as the tolerance size in assertions.
    abhijat committed Jul 8, 2022
    Configuration menu
    Copy the full SHA
    7fbda0e View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2022

  1. cloud_storage/tests: collect and use config batch sizes

    when comparing segment sizes which are restored from s3, the restored
    size is usually smaller than the original size because of the presence
    of config batches in the original which are removed from restored
    segment.
    
    with this change we try to estimate the size of these omitted config
    batches to account for the difference we will tolerate in original and
    restored segments.
    
    this is an approximate comparison, it computes the max offsets for a ntp
    and uses it to come up with a diff assuming 1024 bytes size of a config
    batch - which is actually smaller, close to 512 bytes.
    abhijat committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    79e654b View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. cloud_storage/tests: parse segment to find config batch sizes

    Instead of guessing the segment batch sizes from counts in
    manifest.json, we parse segment files downloaded from minio/s3 and
    accumulate the sizes of non data batches to account for differences in
    data on s3 vs restored partitions.
    abhijat committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    07e87f8 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2022

  1. cloud_storage/tests: use upload max interval to force segment upload

    we use the cloud_storage_max_upload_sec setting to force uploading open
    segments so that we can get a closer size of the recovered segment
    compared to original segment. this allows us to do away with the large
    tolerance value.
    abhijat committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    3f5b81e View commit details
    Browse the repository at this point in the history
  2. cloud_storage/tests: wait for S3 to have all local data

    as we force upload to s3 frequently, when shutting down the node we
    should wait for S3 to have all data uploaded. previously we waited until
    the data was close enough (a diff of default_segment_size * 1.5 was
    acceptable).
    abhijat committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    4b52dd0 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. cloud_storage/tests: use delta of upto 4k

    files on disk can be larger than actual data uploaded to cloud storage.
    it appears this is due to block allocation of segments, in this case the
    maximum diff can be 4095 bytes, if there is an extra block allocated for
    one byte on disk. so we adjust the margin of error to 4096 bytes to
    account for these differences.
    abhijat committed Jul 28, 2022
    Configuration menu
    Copy the full SHA
    8e92bf4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f04de0 View commit details
    Browse the repository at this point in the history