v.23.7Improvement
Introduce wait_for_unique_parts_send_before_shutdown_ms and Fix Shutdown Order for Tables and Handlers
Introduce a table setting wait_for_unique_parts_send_before_shutdown_ms which specify the amount of time replica will wait before closing interserver handler for replicated sends. Also fix inconsistency with shutdown of tables and interserver handlers: now server shutdown tables first and only after it shut down interserver handlers. #51851 (alesapin).Why it matters
This feature addresses the problem of replicas potentially closing replication communication channels too early during server shutdown, which could interrupt data synchronization. By specifying a wait time, it helps ensure all unique parts are properly sent before shutdown, improving replication reliability and consistency.How to use it
To apply this feature, set thewait_for_unique_parts_send_before_shutdown_ms table setting with the desired wait time in milliseconds. This setting governs the replica's wait period before closing the interserver handler during shutdown, ensuring smooth replication termination.