Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

rgw/sfs: Fix list-objects check for common-prefixes #260

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

0xavi0
Copy link

@0xavi0 0xavi0 commented Nov 27, 2023

Fixes a list-objects issue that happened when calculating if a query should be truncated or not when having common prefixes.

The proposed code change is using the last valid entry (entry being either the last object name or common prefix) as the next marker for the call that checks if there are more items.

That way we are taking into account items that were already added to the results and we're not repeating them. (Also the truncation is calculated fine).

PR also adds a new integration test similar to the one reported in the bug and verifies that the list-objects call was not truncated.

Fixes: https://github.com/aquarist-labs/s3gw/issues/838
Signed-off-by: Xavi Garcia [email protected]

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

Fixes a list-objects issue that happened when calculating if a query
should be truncated or not when having common prefixes.

The proposed code change is using the last valid entry (entry being
either the last object name or common prefix) as the next marker for
the call that checks if there are more items.

That way we are taking into account items that were already added to the
results and we're not repeating them. (Also the truncation is
calculated fine).

Fixes: https://github.com/aquarist-labs/s3gw/issues/838
Signed-off-by: Xavi Garcia <[email protected]>
@0xavi0 0xavi0 added the kind/bug Something isn't working label Nov 27, 2023
@0xavi0 0xavi0 added this to the v0.24.0 milestone Nov 27, 2023
@0xavi0 0xavi0 requested a review from irq0 November 27, 2023 15:36
@0xavi0 0xavi0 self-assigned this Nov 27, 2023
@jecluis jecluis merged commit b44c625 into aquarist-labs:s3gw Dec 4, 2023
8 of 9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

rgw/sfs: list_object_versions S3 API call returns truncated flag even if it is not necessary
2 participants