Skip to content

Commit

Permalink
fix(spanner): add safecheck to avoid deadlock when creating multiplex…
Browse files Browse the repository at this point in the history
… session (#11131)
  • Loading branch information
rahul2393 authored Nov 14, 2024
1 parent 4250788 commit 8ee5d05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spanner/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,10 @@ func (p *sessionPool) createMultiplexedSession() {
p.mu.Lock()
p.multiplexedSessionCreationError = err
p.mu.Unlock()
p.mayGetMultiplexedSession <- true
select {
case p.mayGetMultiplexedSession <- true:
case <-c.ctx.Done():
}
continue
}
p.sc.executeCreateMultiplexedSession(c.ctx, client, p.sc.md, p)
Expand Down

0 comments on commit 8ee5d05

Please sign in to comment.