In the current ListenShard(shardID), we automatically connect to the all peers who we know in the shard shardID. This breaks the topology we want to setup in testing.
How can it be fixed?
Don't call connectShardNodes in ListenShard. However, we further need a CLI to actively do this, in order to connect the shard peers, after subscribing to a shard. Further, we need some parameters, e.g. numPeers to limit how many shard peers we will try to connect. And possibly a low/high watermark of connections for each shard, and for overall.
What is wrong?
In the current
ListenShard(shardID)
, we automatically connect to the all peers who we know in the shardshardID
. This breaks the topology we want to setup in testing.How can it be fixed?
Don't call
connectShardNodes
inListenShard
. However, we further need a CLI to actively do this, in order to connect the shard peers, after subscribing to a shard. Further, we need some parameters, e.g.numPeers
to limit how many shard peers we will try to connect. And possibly a low/high watermark of connections for each shard, and for overall.