Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Result NOT Identical to Records In DB #244

Open
guoshenkuang opened this issue Jan 24, 2018 · 4 comments
Open

Query Result NOT Identical to Records In DB #244

guoshenkuang opened this issue Jan 24, 2018 · 4 comments

Comments

@guoshenkuang
Copy link

guoshenkuang commented Jan 24, 2018

we found that when query using multiple go routine, the query result is not identical to that in database.

reproduction environment:

  1. 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)
  2. insert 4 records into hs_his.his_ofdeliver, ('14900666', '270004', '143', '0'), ('1868091', '270004', '143', '0'),('1898964', '270004', '143', '0'),('14900397', '270004', '143', '0'),
  3. run the code in attachment, we expect that the query result should be identical to records in db, but actually not.

sample output:
image
main.go.txt

@tgulacsi
Copy link
Collaborator

No idea. Have you tried with the race detector?
What if you limit the number of goroutines to 1?

@guoshenkuang
Copy link
Author

we have try these three cases:

  1. ora version v4.1.15, 64 go routines, errors are detected in a few seconds
  2. ora version v4.1.15, 1 go routine, the first error is detected in about 10 min
  3. ora version v4.1.9, 64 go routines, no errors are detected in 2 hours

@tgulacsi
Copy link
Collaborator

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 .

@tgulacsi
Copy link
Collaborator

70733b7 has a reproducer

go test -race -run=244

But couldn't find a solution yet.
gopkg.in/goracle.v2 does not have this error (with the same test).

tgulacsi added a commit that referenced this issue Jan 25, 2018
tgulacsi added a commit that referenced this issue Jan 25, 2018
tgulacsi added a commit that referenced this issue Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants