Query Result NOT Identical to Records In DB
Opened this issue · 4 comments
guoshenkuang commented
we found that when query using multiple go routine, the query result is not identical to that in database.
reproduction environment:
- we have a table hs_his.his_ofdeliver, with 4 columns, FUND_ACCOUNT NOT NULL VARCHAR2(18),FUND_CODE NOT NULL VARCHAR2(6), BUSINESS_FLAG NOT NULL NUMBER(10), MONEY_TYPE NOT NULL VARCHAR2(3)
- insert 4 records into hs_his.his_ofdeliver, ('14900666', '270004', '143', '0'), ('1868091', '270004', '143', '0'),('1898964', '270004', '143', '0'),('14900397', '270004', '143', '0'),
- run the code in attachment, we expect that the query result should be identical to records in db, but actually not.
sample output:
main.go.txt
tgulacsi commented
No idea. Have you tried with the race detector?
What if you limit the number of goroutines to 1?
guoshenkuang commented
we have try these three cases:
- ora version v4.1.15, 64 go routines, errors are detected in a few seconds
- ora version v4.1.15, 1 go routine, the first error is detected in about 10 min
- ora version v4.1.9, 64 go routines, no errors are detected in 2 hours
tgulacsi commented
I'll try to create a reproducer, but if you use only database/sql, you could easily try my other driver, gopkg.in/goracle.v2 .