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

archival: always use last_offset if available to schedule uploads #8968

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

andrwng
Copy link
Contributor

@andrwng andrwng commented Feb 17, 2023

We previously predicated on whether there were existing segments to choose an upload start offset. This wouldn't work in cases where the manifest is entirely truncated away.

Without this, once attempting to upload after GCing all cloud segments, we could end up with errors like:

ERROR 2023-02-16 22:54:19,549 [shard 14] archival - [fiber51 kafka/scale_000000/165] - ntp_archiver_service.cc:184 - upload loop error: std::runtime_error (ntp {kafka/scale_000000/165}: log offset 4085 is outside the translation range (starting at 8830))

Fixes #8945

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

Release Notes

Bug Fixes

  • Fixed an issue that could prevent uploads after all cloud segments have been garbage collected.

We previously predicated on whether there were existing segments to
choose an upload start offset. This wouldn't work in cases where the
manifest is entirely truncated away.

Without this, once attempting to upload after GCing all cloud segments,
we could end up with errors like:

```
ERROR 2023-02-16 22:54:19,549 [shard 14] archival - [fiber51 kafka/scale_000000/165] - ntp_archiver_service.cc:184 - upload loop error: std::runtime_error (ntp {kafka/scale_000000/165}: log offset 4085 is outside the translation range (starting at 8830))
```

Fixes redpanda-data#8945
@andrwng
Copy link
Contributor Author

andrwng commented Feb 18, 2023

CI failure is #8758

@andrwng andrwng merged commit dc47c26 into redpanda-data:dev Feb 18, 2023
@andrwng
Copy link
Contributor Author

andrwng commented Feb 18, 2023

/backport v22.3.x

@andrwng
Copy link
Contributor Author

andrwng commented Feb 18, 2023

/backport v22.2.x

@andrwng
Copy link
Contributor Author

andrwng commented Feb 18, 2023

/backport v22.1.x

@vbotbuildovich
Copy link
Collaborator

Failed to run cherry-pick command. I executed the below command:

git cherry-pick -x 6dd451d1cf8cb7528a7368d2175820508b5a4943

Workflow run logs.

@vbotbuildovich
Copy link
Collaborator

Failed to run cherry-pick command. I executed the below command:

git cherry-pick -x 6dd451d1cf8cb7528a7368d2175820508b5a4943

Workflow run logs.

@vbotbuildovich
Copy link
Collaborator

Failed to run cherry-pick command. I executed the below command:

git cherry-pick -x 6dd451d1cf8cb7528a7368d2175820508b5a4943

Workflow run logs.

@jcsp
Copy link
Contributor

jcsp commented Feb 20, 2023

@andrwng when you backport to 22.3, please include the test fixes from #8993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload error after all cloud segments get GCed
4 participants