Skip to content

Commit

Permalink
spanner: increase the timeout in session preparation
Browse files Browse the repository at this point in the history
Periodically, DeadlineExceeded errors are reported in logs. But
there seems to be no affect on performance and the errors are
unactionable. The current timeout is very short (1 second), so
we should consider to increase it.

Fixes #1657.

Change-Id: Ie6624795dccfc58877bbb1b5d1d7b688ad346b42
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/49830
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Knut Olav Løite <koloite@gmail.com>
  • Loading branch information
hengfengli committed Dec 29, 2019
1 parent aa359b4 commit 6be7f45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spanner/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ func (hc *healthChecker) worker(i int) {
}
ws := getNextForTx()
if ws != nil {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
err := ws.prepareForWrite(ctx)
cancel()
if err != nil {
Expand Down

0 comments on commit 6be7f45

Please sign in to comment.