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

[v23.2.x] archival: Use explicit types to encode upload candidate creation result #16099

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #15089

New types are added to track failures during candidate creation. An
upload candidate creation can result in three outcomes:

* The candidate is created successfully
* The candidate creation fails, and the offsets inspected should be
  skipped.
* The candidate creation fails, and the offsets should be retried.

The result is modeled as a sum type with these variants. An error is
added to be able to log in the second and third cases.

(cherry picked from commit 5cc166e)
Utilities for extracting candidate creation result and asserting types
are added.

(cherry picked from commit d3eeae6)
The ntp archiver relies on tools in archival policy to create upload
candidates. These are modified to return errors during candidate
creation explicitly, instead of inferring that creation failed from
upload candidate members.

It is possible to further propagate the type up the call chain so that
we do not use empty upload candidates when waiting for uploads to
finish, but this can be addressed in a different changeset.

(cherry picked from commit 2512d4e)
@vbotbuildovich vbotbuildovich added this to the v23.2.x-next milestone Jan 15, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 15, 2024
@abhijat abhijat marked this pull request as ready for review January 15, 2024 07:17
@abhijat
Copy link
Contributor

abhijat commented Jan 15, 2024

all three errors are known issues:
#13456
#13650
#12659

@piyushredpanda piyushredpanda merged commit 2afbf0c into redpanda-data:v23.2.x Jan 15, 2024
21 of 24 checks passed
@piyushredpanda piyushredpanda modified the milestones: v23.2.x-next, v23.2.23 Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants