342
currentShardID int32,
343
allClusterInfo map[string]cluster.ClusterInformation,
345
>
currentShardCount := allClusterInfo[currentClusterName].ShardCount
346
>
var readerIDs []int64
347
>
for clusterName, clusterInfo := range allClusterInfo {
348
>
if clusterName == currentClusterName || !clusterInfo.Enabled {
349
>
continue
350
}
351
353
>
targetShardCount := allClusterInfo[clusterName].ShardCount
354
>
for _, targetShardID := range common.MapShardID(
355
>
currentShardCount,
356
>
targetShardCount,
357
>
currentShardID,
358
>
) {
359
>
readerIDs = append(readerIDs, shard.ReplicationReaderIDFromClusterShardID(
360
>
targetClusterID, targetShardID,
361
>
))
362
>
}
363
}
365
}