v.20.5Improvement
OPTIMIZE FINAL Forces Merge Despite Concurrent Operations
OPTIMIZE FINAL will force merge even if concurrent merges are performed. This closes #11309 and closes #11322. #11346 (alexey-milovidov).
Why it matters
This feature addresses the issue whereOPTIMIZE FINAL could be skipped or delayed due to ongoing concurrent merges, ensuring that users can reliably compact data to a single part when needed. It improves control over data merging and compaction behavior.How to use it
To use this feature, run theOPTIMIZE FINAL command on your table as usual. The operation will force the merge of all parts even if other merges are currently happening, guaranteeing completion.Example:
OPTIMIZE TABLE <table_name> FINAL;