Skip to content

Commit

Permalink
FMWK-405-node-list
Browse files Browse the repository at this point in the history
- comment update
  • Loading branch information
filkeith committed Sep 23, 2024
1 parent 7188f09 commit 483b20d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions handler_backup_records.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ func (bh *backupRecordsHandler) makeAerospikeReadWorkersForNodes(
nodes := bh.aerospikeClient.GetNodes()
// If bh.config.NodeList is not empty we filter nodes.
nodes = filterNodes(bh.config.NodeList, nodes)
// As we can have nodes < workers, we must spread nodes only to workers.
// As we can have nodes < workers, we can't distribute a small number of nodes to a large number of workers.
// So we set workers = nodes.
if len(nodes) < n {
n = len(nodes)
}
Expand All @@ -189,7 +190,7 @@ func (bh *backupRecordsHandler) makeAerospikeReadWorkersForNodes(
}

readWorkers := make([]pipeline.Worker[*models.Token], n)
// As nodesGroups can be < then workers number; we iterate over groups.

for i := 0; i < n; i++ {
// Skip empty groups.
if len(nodesGroups[i]) == 0 {
Expand Down

0 comments on commit 483b20d

Please sign in to comment.