aboutsummaryrefslogtreecommitdiff
path: root/error.go
diff options
context:
space:
mode:
authorAndrii Zavorotnii <andrii.zavorotnii@gmail.com>2019-09-05 15:26:33 -0700
committerAndrii Zavorotnii <andrii.zavorotnii@gmail.com>2019-09-06 12:15:53 -0700
commit7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67 (patch)
tree630fdf358dac611fac8f0ee19362d9583f4fcec4 /error.go
parentFix memory leak in ExpandedSQL (#738) (diff)
downloadgolite-7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67.tar.gz
golite-7e1a61dbcdb71e3220e5cc54cd2ef7d32b0b9b67.tar.xz
Fix context cancellation racy handling
[why] Context cancellation goroutine is not in sync with Next() method lifetime. It leads to sql.ErrNoRows instead of context.Canceled often (easy to reproduce). It leads to interruption of next query executed on same connection (harder to reproduce). [how] Do query in goroutine, wait when interruption done. [testing] Add unit test that reproduces error cases.
Diffstat (limited to 'error.go')
0 files changed, 0 insertions, 0 deletions