Skip to content

Commit

Permalink
rename warming reads pool variable and comment
Browse files Browse the repository at this point in the history
Signed-off-by: Olga Shestopalova <[email protected]>
  • Loading branch information
Olga Shestopalova committed Sep 29, 2023
1 parent 96067a1 commit dd0444c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/vt/vtgate/engine/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,14 @@ func (route *Route) executeWarmingReplicaRead(ctx context.Context, vcursor VCurs
}

replicaVCursor := vcursor.CloneForReplicaWarming(ctx)
pool := vcursor.GetWarmingReadsChannel()
warmingReadsChannel := vcursor.GetWarmingReadsChannel()

select {
// if there's no more room in the pool, drop the warming read
case pool <- true:
// if there's no more room in the channel, drop the warming read
case warmingReadsChannel <- true:
go func(replicaVCursor VCursor) {
defer func() {
<-pool
<-warmingReadsChannel
}()
rss, _, err := route.findRoute(ctx, replicaVCursor, bindVars)
if err != nil {
Expand Down

0 comments on commit dd0444c

Please sign in to comment.