Skip to content

Commit

Permalink
fix: Shard then shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah committed Sep 18, 2024
1 parent 40adee3 commit 58d9c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scheduler/scheduler_shuffle.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func (s *syncClient) syncShuffle(ctx context.Context, resolvedResources chan<- *
// however, if the table order changes, the seed will change and the shuffle order will be different,
// so users have a little bit of control over the randomization.
seed := hashTableNames(tableNames)
shuffle(tableClients, seed)
tableClients = shardTableClients(tableClients, s.shard)
shuffle(tableClients, seed)

var wg sync.WaitGroup
for _, tc := range tableClients {
Expand Down

0 comments on commit 58d9c71

Please sign in to comment.