aboutsummaryrefslogtreecommitdiff
path: root/upgrade/upgrade.go
diff options
context:
space:
mode:
authorAndrii Zavorotnii <andrii.zavorotnii@gmail.com>2020-08-28 08:43:21 -0700
committerGitHub <noreply@github.com>2020-08-29 00:43:21 +0900
commit862b95943f99f3b40e317a79d41c27ac4b742011 (patch)
tree8ddf5deb99c4466eed725e130060083b29558e55 /upgrade/upgrade.go
parentUse go-pointer instead of uintptr hacks. (#814) (diff)
downloadgolite-862b95943f99f3b40e317a79d41c27ac4b742011.tar.gz
golite-862b95943f99f3b40e317a79d41c27ac4b742011.tar.xz
Fix "cannot start a transaction within a transaction" issue (#764) (#765)
* Fix "cannot start a transaction within a transaction" issue [why] If db.BeginTx(ctx, nil) context is cancelled too fast, "BEGIN" statement can be completed inside DB, but we still try to cancel it with sqlite3_interrupt. In such case we get context.Cancelled or context.DeadlineExceeded from exec(), but operation really completed. Connection returned into pool, and returns "cannot start a transaction within a transaction" error for next db.BeginTx() call. [how] Handle status code returned from cancelled operation. [testing] Added unit-test which reproduces issue. * Reduce TestQueryRowContextCancelParallel concurrency [why] Tests times out in travis-ci when run with -race option.
Diffstat (limited to 'upgrade/upgrade.go')
0 files changed, 0 insertions, 0 deletions