v.21.3Improvement

Add Settings for Insertion Handling of Inactive Parts

Add two settings to delay or throw error during insertion when there are too many inactive parts. This is useful when server fails to clean up parts quickly enough. #20178 (Amos Bird).
Added two new settings to control insertion behavior when there are too many inactive parts in MergeTree tables.

Why it matters

This feature addresses situations where the server fails to clean up inactive parts quickly enough, which can lead to an excessive number of inactive parts accumulating. By allowing users to delay insertions or throw errors when this condition is detected, it helps maintain system stability and prevents uncontrolled growth of inactive parts.

How to use it

Users can enable these settings by configuring the new parameters that delay insertion or cause an insertion to fail when the number of inactive parts exceeds a threshold. This is done by setting the appropriate configuration options before performing inserts.