commitlog: Recycle or not should not depend on shutdown state
If we are using recycling, we should always use recycle in delete_segments, otherwise we can cause deadlock with replenish task, since it will be waiting for segment, then shutdown is set, and we are called, and can't fulfil the alloc -> deadlock
This commit is contained in:
@@ -1802,7 +1802,7 @@ future<> db::commitlog::segment_manager::delete_segments(std::vector<sstring> fi
|
||||
}
|
||||
|
||||
// We allow reuse of the segment if the current disk size is less than shard max.
|
||||
if (!_shutdown && cfg.reuse_segments) {
|
||||
if (cfg.reuse_segments) {
|
||||
auto usage = totals.total_size_on_disk;
|
||||
auto recycle = usage <= max_disk_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user