Skip to content

Commit

Permalink
cloud_storage: adjust condition to remove archiver
Browse files Browse the repository at this point in the history
an archiver is removed in reconcile loop if it is stopped. the stop
condition checks if the upload loop is stopped. with read replica there
are two status variables which denote a stopped loop. this change makes
the condition such that any of these two variables being true marks the
archiver as stopped, as the two conditions start out being false. they
turn to true in mutually exclusive code paths.

the archiver must be marked as removed in order for a stopped upload
loop to restart.
  • Loading branch information
abhijat committed Aug 10, 2022
1 parent 8ad74a2 commit 14c8522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/archival/service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ ss::future<> scheduler_service_impl::reconcile_archivers() {
auto p = pm.get(ntp);
if (
!p
|| (archiver->upload_loop_stopped() && archiver->sync_manifest_loop_stopped())) {
|| (archiver->upload_loop_stopped() || archiver->sync_manifest_loop_stopped())) {
to_remove.push_back(ntp);
}
}
Expand Down

0 comments on commit 14c8522

Please sign in to comment.