-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-38255: [Java] Implement Flight SQL Bulk Ingestion #43551
Conversation
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java
Outdated
Show resolved
Hide resolved
...ht-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/utils/MockFlightSqlProducer.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/NoOpFlightSqlProducer.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
...tests/src/main/java/org/apache/arrow/flight/integration/tests/FlightSqlScenarioProducer.java
Show resolved
Hide resolved
hi @lidavidm, any update please? |
Sorry @eramitmittal, I will try to get to it tomorrow |
It appears this fails the actual integration tests, though |
Thanks looking into the integration failures. They passed on my local machine. |
@lidavidm any hint on how to proceed? Only Java 21+ runs are failing on Ubuntu complaining about memory leak in I have also tried to statically study the Since the problem occurs only in CI, is there any possibility to run the tests in CI with DEBUG on for allocator? |
That's not the error I'm concerned about, I'm more wondering why the integration tests fail:
|
As for the memory leak, @vibhatha since we disabled the debug logging, how can it be reenabled here? |
@lidavidm the integration tests should be fixed now with new pushed commit. |
…llocation debug trail in case tests fail due to memory leak)
@lidavidm I have added an allocationListener to the tests to keep track of allocation and release. In case of failure due to IllegalStateException I am then printing the allocation/release trail. Hopefully this should be able to provide information on where the mem leak occurs. Can you please approve the CI? |
Done. It seems it's either the server or the client's handling of putResult that's the issue? (Maybe sometimes we aren't draining the stream on the client properly?) |
I see client side allocating and releasing PutResult fine.
Problem is at server side:
I see release corresponding to ackStream.onCompleted()
..but no trace of buffer getting closed due to try-with-resources. It seems as if executor thread got completed before calling the finally!!!
In the tests client finishes and then server.close() gets called which shutdown the ExecutorService without waiting for pending tasks to finish. Flow similar to FlightServer.close() is needed |
@eramitmittal I guess then in this case we need to make sure we gracefully release all resources. |
@vibhatha in general FlightServer.close() and shutdown methods need a review to account for pending tasks in ExecutorService as well. Other way obviously is that I can introduce a short delay in the IntegrationTest.testScenario method to allow ExecutorService threads to finish. But that will not solve the problem getting highlighted in FlightServer. I think graceful shutdown of FlightServer can be handled as a separate issue and for now I can just make the tests pass. What do you think? |
…allow ExecutorService to finish pending tasks)
Pushed a wait for ExecutorService to terminate in IntegrationTest.testScenario method. @lidavidm please approve the CI |
...tegration-tests/src/test/java/org/apache/arrow/flight/integration/tests/IntegrationTest.java
Show resolved
Hide resolved
…to explain wait for executorService to finish)
So nice to see the integration tests passing consistently now :). Hope to see this merged soon. Thanks |
Argh, I didn't notice that this used a closed GitHub issue. |
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 5ca12bd. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
) Please look at apache#38255 for details on this functionality. Support for Go and C++ was added as part of apache#38385. This pull request is to add the required support for Java. * GitHub Issue: apache#38255 Lead-authored-by: Amit Mittal <[email protected]> Co-authored-by: Amit Mittal <[email protected]> Signed-off-by: David Li <[email protected]>
) Please look at apache#38255 for details on this functionality. Support for Go and C++ was added as part of apache#38385. This pull request is to add the required support for Java. * GitHub Issue: apache#38255 Lead-authored-by: Amit Mittal <[email protected]> Co-authored-by: Amit Mittal <[email protected]> Signed-off-by: David Li <[email protected]>
Please look at #38255 for details on this functionality. Support for Go and C++ was added as part of #38385.
This pull request is to add the required support for Java.