Skip to content

Commit

Permalink
cluster: delete local storage before remote storage
Browse files Browse the repository at this point in the history
Unavailability of the S3 backend should not prevent cleanup
of local objects.
  • Loading branch information
jcsp committed Dec 19, 2022
1 parent d399c7e commit 580c8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/cluster/partition_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,14 @@ partition_manager::remove(const model::ntp& ntp, partition_removal_mode mode) {
.then([this, ntp] { _unmanage_watchers.notify(ntp, ntp.tp.partition); })
.then([partition] { return partition->stop(); })
.then([partition] { return partition->remove_persistent_state(); })
.then([this, ntp] { return _storage.log_mgr().remove(ntp); })
.then([partition, mode] {
if (mode == partition_removal_mode::global) {
return partition->remove_remote_persistent_state();
} else {
return ss::now();
}
})
.then([this, ntp] { return _storage.log_mgr().remove(ntp); })
.finally([partition] {}); // in the end remove partition
}

Expand Down

0 comments on commit 580c8ac

Please sign in to comment.