It is confusing. For query compaction, it initialized to `always_gc`, for sstable compaction it is initialized to a lambda calling into `can_gc()`. This makes understanding the purpose of this member very confusing. The real use of this member is to bridge mutation_partition::compact_and_expire() with can_gc(). This patch ditches the member and creates the lambda near the call sites instead, just like the other params to `compact_and_expire()` already are. can_gc() now also respects _tombstone_gc.is_gc_enabled() instead of just blindly returning true when in query mode. With this patch, whether tombstones are collected or not in query mode is now consistent and controlled by the tombstone_gc_state.
32 KiB
32 KiB