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

[Go] FlightSQL TestPreparedStatementNoSchema test is failing #35328

Closed
hermanschaaf opened this issue Apr 25, 2023 · 3 comments · Fixed by #38044
Closed

[Go] FlightSQL TestPreparedStatementNoSchema test is failing #35328

hermanschaaf opened this issue Apr 25, 2023 · 3 comments · Fixed by #38044
Assignees
Milestone

Comments

@hermanschaaf
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

This test failure is occurring for Go 1.18 on branches with no FlightSQL-related changes:

--- FAIL: TestPreparedStatementNoSchema (0.01s)
    driver_test.go:741: 
        	Error Trace:	/arrow/go/arrow/flight/flightsql/driver/driver_test.go:741
        	Error:      	Error "EOF" does not contain "parameter schema: unexpected"
        	Test:       	TestPreparedStatementNoSchema
FAIL
FAIL	github.com/apache/arrow/go/v12/arrow/flight/flightsql/driver	1.125s

For example: https://github.com/apache/arrow/actions/runs/4792026546/jobs/8523088061#step:5:816

It seems to happen frequently; I'm not sure if it happens 100% of the time.

Component(s)

Go

@zeroshade
Copy link
Member

Yea, I've been trying to pin down the cause of it and have been unsuccessful so far.

@srebhan can you take a look here as this was introduced with your changes for the driver?

@srebhan
Copy link
Contributor

srebhan commented Aug 11, 2023

@zeroshade I cannot reproduce the issue with latest master. Tested with go 1.20 and go 1.18 with 100 tests in a row passing without issues.

We should close this issue...

@zeroshade
Copy link
Member

We've been having issues reproducing this issue since it first showed up, but every so often I still see it happen in CI: for example here https://github.com/apache/arrow/actions/runs/5937796502/job/16109536613?pr=37304

zeroshade added a commit that referenced this issue Oct 5, 2023
### Rationale for this change
Fixing a flaky test that is *very* difficult to reproduce.

### What changes are included in this PR?
Adding an explicit call to drain the remaining batches from the parameter batch reader in the `DoPutPreparedStatementQuery` of the `MockServer` in the tests. This ensures that the gRPC connection doesn't close on us in between the client writing the schema message and writing the record batch message producing an `io.EOF` error. This is an extremely rare occurence based on goroutine scheduling due to the client and mockserver both running in the same process for the tests, in local testing i was only able to get it to happen 1 - 4 times per 5000 runs of the test.

### Are there any user-facing changes?
No

* Closes: #35328

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
@zeroshade zeroshade added this to the 14.0.0 milestone Oct 5, 2023
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…pache#38044)

### Rationale for this change
Fixing a flaky test that is *very* difficult to reproduce.

### What changes are included in this PR?
Adding an explicit call to drain the remaining batches from the parameter batch reader in the `DoPutPreparedStatementQuery` of the `MockServer` in the tests. This ensures that the gRPC connection doesn't close on us in between the client writing the schema message and writing the record batch message producing an `io.EOF` error. This is an extremely rare occurence based on goroutine scheduling due to the client and mockserver both running in the same process for the tests, in local testing i was only able to get it to happen 1 - 4 times per 5000 runs of the test.

### Are there any user-facing changes?
No

* Closes: apache#35328

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…pache#38044)

### Rationale for this change
Fixing a flaky test that is *very* difficult to reproduce.

### What changes are included in this PR?
Adding an explicit call to drain the remaining batches from the parameter batch reader in the `DoPutPreparedStatementQuery` of the `MockServer` in the tests. This ensures that the gRPC connection doesn't close on us in between the client writing the schema message and writing the record batch message producing an `io.EOF` error. This is an extremely rare occurence based on goroutine scheduling due to the client and mockserver both running in the same process for the tests, in local testing i was only able to get it to happen 1 - 4 times per 5000 runs of the test.

### Are there any user-facing changes?
No

* Closes: apache#35328

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…pache#38044)

### Rationale for this change
Fixing a flaky test that is *very* difficult to reproduce.

### What changes are included in this PR?
Adding an explicit call to drain the remaining batches from the parameter batch reader in the `DoPutPreparedStatementQuery` of the `MockServer` in the tests. This ensures that the gRPC connection doesn't close on us in between the client writing the schema message and writing the record batch message producing an `io.EOF` error. This is an extremely rare occurence based on goroutine scheduling due to the client and mockserver both running in the same process for the tests, in local testing i was only able to get it to happen 1 - 4 times per 5000 runs of the test.

### Are there any user-facing changes?
No

* Closes: apache#35328

Authored-by: Matt Topol <zotthewizard@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants