v.23.4Performance Improvement
Enhancements to Local Replica Queries and Coordinator Initialization in ClickHouse
Now an internal query to local replica is sent explicitly and data from it received through loopback interface. Setting prefer_localhost_replica is not respected for parallel replicas. This is needed for better scheduling and makes the code cleaner: the initiator is only responsible for coordinating of the reading process and merging results, continuously answering for requests while all the secondary queries read the data. Note: Using loopback interface is not so performant, otherwise some replicas could starve for tasks which could lead to even slower query execution and not utilizing all possible resources. The initialization of the coordinator is now even more lazy. All incoming requests contain the information about the reading algorithm we initialize the coordinator with it when first request comes. If any replica decides to read with a different algorithmβan exception will be thrown and a query will be aborted. #48246 (Nikita Mikhaylov).