Issue with Parameter Info when execute QueryContext with parameter encode.
jawadpak opened this issue · 0 comments
We have a DATA RACE issue with Parameter Info when our application execute the database operations in parallels. Here is the log below:
WARNING: DATA RACE
[2023-02-02T21:18:53.995Z] Read at 0x0000040017e8 by goroutine 460:
[2023-02-02T21:18:53.995Z] github.com/sijms/go-ora/v2.(*ParameterInfo).encodeValue()
[2023-02-02T21:18:53.995Z] /var/vendor/github.com/sijms/go-ora/v2/parameter_encode.go:587 +0x6ada
[2023-02-02T21:18:53.995Z] github.com/sijms/go-ora/v2.(*Stmt).NewParam()
[2023-02-02T21:18:53.995Z] /var/vendor/github.com/sijms/go-ora/v2/command.go:1498 +0x2c4
[2023-02-02T21:18:53.995Z] github.com/sijms/go-ora/v2.(*Stmt).Query()
[2023-02-02T21:18:53.995Z] /var/vendor/github.com/sijms/go-ora/v2/command.go:1644 +0x346
[2023-02-02T21:18:53.995Z] github.com/sijms/go-ora/v2.(*Stmt).QueryContext()
[2023-02-02T21:18:53.995Z] /var/vendor/github.com/sijms/go-ora/v2/command.go:1566 +0x51e
[2023-02-02T21:18:53.995Z] github.com/sijms/go-ora/v2.(*Connection).QueryContext()
[2023-02-02T21:18:53.995Z] /var//vendor/github.com/sijms/go-ora/v2/connection.go:1143 +0xc4
[2023-02-02T21:18:53.995Z] database/sql.ctxDriverQuery()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/ctxutil.go:48 +0x217
[2023-02-02T21:18:53.995Z] database/sql.(*DB).queryDC.func1()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/sql.go:1722 +0x264
[2023-02-02T21:18:53.995Z] database/sql.withLock()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/sql.go:3396 +0xb5
[2023-02-02T21:18:53.995Z] database/sql.(*DB).queryDC()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/sql.go:1717 +0x24d
[2023-02-02T21:18:53.995Z] database/sql.(*Conn).QueryContext()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/sql.go:1972 +0x13d
[2023-02-02T21:18:53.995Z] database/sql.(*Conn).QueryRowContext()
[2023-02-02T21:18:53.995Z] /usr/local/go/src/database/sql/sql.go:1982 +0x4a4