No data or expired data that is different from result in Dbeaver with same SQL returned
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 import go-ora finally, to interact with Oracle database.
go-ora version in go.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 in gorm.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#maxIdleConnectionto0), 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.
Oracle db:
Oracle Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0We are using
gorm-oracle, which will importgo-orafinally, to interact with Oracle database.
go-oraversion 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 ONLYWe occasionally got nothing returned or wrong
statusingorm.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#maxIdleConnectionto0), 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!