mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 16:40:35 +00:00
In a cross-dc large cluster, the receiver node of the gossip SYN message might be slow to send the gossip ACK message. The ack messages can be large if the payload of the application state is big, e.g., CACHE_HITRATES with a lot of tables. As a result, the unlimited ACK message can consume unlimited amount of memory which causes OOM eventually. To fix, this patch queues the SYN message and handles it later if the previous ACK message is still being sent. However, we only store the latest SYN message. Since the latest SYN message from peer has the latest information, so it is safe to drop the previous SYN message and keep the latest one only. After this patch, there can be at most 1 pending SYN message and 1 pending ACK message per peer node.