Skip to content

Commit

Permalink
fix consistent high timeout err rate caused by prepareStatement (apac…
Browse files Browse the repository at this point in the history
…he#892)

* fix timeout bug

* remove cache no matter which err returns
  • Loading branch information
zhixinwen authored and Zariel committed Apr 18, 2017
1 parent 66628b3 commit 09f0498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ func (c *Conn) prepareStatement(ctx context.Context, stmt string, tracer Tracer)

framer, err := c.exec(ctx, prep, tracer)
if err != nil {
flight.err = err
flight.wg.Done()
c.session.stmtsLRU.remove(stmtCacheKey)
return nil, err
}

Expand Down

0 comments on commit 09f0498

Please sign in to comment.