MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getClusterConnectionsCount

Function getClusterConnectionsCount

app/redis-6.2.6/src/cluster.c:731–737  ·  view source on GitHub ↗

Return the approximated number of sockets we are using in order to * take the cluster bus connections. */

Source from the content-addressed store, hash-verified

729/* Return the approximated number of sockets we are using in order to
730 * take the cluster bus connections. */
731unsigned long getClusterConnectionsCount(void) {
732 /* We decrement the number of nodes by one, since there is the
733 * "myself" node too in the list. Each node uses two file descriptors,
734 * one incoming and one outgoing, thus the multiplication by 2. */
735 return server.cluster_enabled ?
736 ((dictSize(server.cluster->nodes)-1)*2) : 0;
737}
738
739/* -----------------------------------------------------------------------------
740 * Key space handling

Callers 2

genRedisInfoStringFunction · 0.85
acceptCommonHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected