Return the approximated number of sockets we are using in order to * take the cluster bus connections. */
| 768 | /* Return the approximated number of sockets we are using in order to |
| 769 | * take the cluster bus connections. */ |
| 770 | unsigned long getClusterConnectionsCount(void) { |
| 771 | /* We decrement the number of nodes by one, since there is the |
| 772 | * "myself" node too in the list. Each node uses two file descriptors, |
| 773 | * one incoming and one outgoing, thus the multiplication by 2. */ |
| 774 | return g_pserver->cluster_enabled && g_pserver->cluster != nullptr ? |
| 775 | ((dictSize(g_pserver->cluster->nodes)-1)*2) : 0; |
| 776 | } |
| 777 | |
| 778 | /* ----------------------------------------------------------------------------- |
| 779 | * Key space handling |
no outgoing calls
no test coverage detected