Open cloorc opened 1 week ago
Oracle db:
Oracle Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0
We are using
gorm-oracle
, which will importgo-ora
finally, to interact with Oracle database.
go-ora
version ingo.mod
:github.com/sijms/go-ora/v2 v2.8.11
.For following SQL:
SELECT * FROM "t_key" WHERE "tenant_id" = :1 AND "app_id" = :2 AND "dispatching_key" = :3 AND "delete_flag" = :4 ORDER BY "t_key"."id" FETCH NEXT :5 ROWS ONLY
We occasionally got nothing returned or wrong
status
ingorm.DB#First()
. However, in Dbeaver we could see data as expected with the exactly same SQL.We tried:
- Disable connection pool(set
database/sql.DB#maxIdleConnection
to0
), the issue can still be reproduced;- Limit the connection pool to 1, the issue can still be reproduced;
We thought cursor may be leaked and we checked
database/sql.Rows#Close()
and make sure it will be closed finally. We'd also doubt the session state but has very little knowledge about this.
Update: we've enabled CDC on our database(a pdb).
Have you inserted but not yet committed the data in Dbeaver (or any other connection)?
Have you inserted but not yet committed the data in Dbeaver (or any other connection)?
I'm sure we'd never inserted, updated or deleted any data at the same time from Dbeaver.
And we disabled supplemental log for CDC and the issue is still.
Thanks a lot!
Oracle db:
We are using
gorm-oracle
, which will importgo-ora
finally, to interact with Oracle database.go-ora
version ingo.mod
:github.com/sijms/go-ora/v2 v2.8.11
.For following SQL:
We occasionally got nothing returned or wrong
status
ingorm.DB#First()
. However, in Dbeaver we could see data as expected with the exactly same SQL.We tried:
database/sql.DB#maxIdleConnection
to0
), the issue can still be reproduced;We thought cursor may be leaked and we checked
database/sql.Rows#Close()
and make sure it will be closed finally. We'd also doubt the session state but has very little knowledge about this.