v.21.10Improvements
Fix zookeeper_log.address and optimize getpeername() calls in zookeeper client
Fixzookeeper_log.address(before the first patch in this PR the address was always::) and reduce number of callsgetpeername(2)for this column (since each time entry forzookeeper_logis addedgetpeername()is called, cache this address in the zookeeper client to avoid this). #28212 (Azat Khuzhin).
Why it matters
Previously, thezookeeper_log.address column always showed the address as ::, which was incorrect. Additionally, each log entry trigger caused multiple costly getpeername(2) system calls. This update fixes the address reporting and caches the address in the ZooKeeper client to minimize unnecessary getpeername() calls, improving performance when logging.How to use it
This fix is automatically applied in thezookeeper_log system log. Users do not need to take any manual action. The zookeeper_log.address column will now correctly reflect the client address with fewer performance overheads during ZooKeeper logging.