Only return an executor to the pool once
The executor was being returned to the pool twice, which was resulting in nil interface{} errors when creating new executors concurrently, as the transaction would not be set properly.
This commit is contained in:
parent
26e5ef3978
commit
37e015b482
2 changed files with 0 additions and 9 deletions
2
db/db.go
2
db/db.go
|
@ -223,8 +223,6 @@ func Process(fib *fibre.Context, ast *sql.Query, vars map[string]interface{}) (o
|
|||
|
||||
executor := newExecutor()
|
||||
|
||||
defer executor.reset()
|
||||
|
||||
go executor.execute(ctx, ast)
|
||||
|
||||
// Wait for all of the processed queries to
|
||||
|
|
|
@ -47,13 +47,6 @@ func newExecutor() (e *executor) {
|
|||
|
||||
}
|
||||
|
||||
func (e *executor) reset() {
|
||||
|
||||
e.send = nil
|
||||
executorPool.Put(e)
|
||||
|
||||
}
|
||||
|
||||
func (e *executor) execute(ctx context.Context, ast *sql.Query) {
|
||||
|
||||
var err error
|
||||
|
|
Loading…
Reference in a new issue