mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
mapperLocal: actually leave loop on read from done channel
staticcheck points out that the break is otherwise an ineffective break because it just ends the current case clause of the switch it's in, which is true.
This commit is contained in:
parent
1745a93aee
commit
ab9b70d7e8
1 changed files with 2 additions and 1 deletions
|
|
@ -5939,6 +5939,7 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu
|
|||
ch := make(chan mapResponse, len(shards))
|
||||
|
||||
expected := 0
|
||||
shardLoop:
|
||||
for _, shard := range shards {
|
||||
j := job{
|
||||
shard: shard,
|
||||
|
|
@ -5949,7 +5950,7 @@ func (e *executor) mapperLocal(ctx context.Context, shards []uint64, mapFn mapFu
|
|||
}
|
||||
select {
|
||||
case <-done:
|
||||
break
|
||||
break shardLoop
|
||||
case e.work <- j:
|
||||
expected++
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue