v.24.2Improvement

Fix for Endless Loop in Background Merges Due to Low merge_max_block_size_bytes Setting

In case when merge_max_block_size_bytes is small enough and tables contain wide rows (strings or tuples) background merges may stuck in an endless loop. This behaviour is fixed. Follow-up for https://github.com/ClickHouse/ClickHouse/pull/59340. #59812 (Nikita Mikhaylov).
Fixes an issue where background merges could get stuck in an endless loop when merge_max_block_size_bytes is set to a small value on tables with wide rows (strings or tuples).

Why it matters

This fix addresses a problem that caused background merges to never complete under specific conditions, improving stability and performance for tables with wide rows when using a small merge_max_block_size_bytes setting.

How to use it

Users do not need to perform any special action other than upgrading to the new ClickHouse version containing this fix. The issue occurs when merge_max_block_size_bytes is configured to a small value for tables with wide rows, so users with such configurations will benefit from this update automatically.