toddmeng-db commented on code in PR #3217:
URL: https://github.com/apache/arrow-adbc/pull/3217#discussion_r2243369713


##########
csharp/src/Drivers/Apache/Hive2/HiveServer2Statement.cs:
##########
@@ -394,6 +404,10 @@ public override void Dispose()
                     HiveServer2Connection.HandleThriftResponse(resp.Status, 
activity);
                     OperationHandle = null;
                 }
+                // For DatabricksReader, must be called after CloseOperation, 
otherwise it may cancel a 
+                // request when the input buffer of Thrift client has not been 
consumed/cleaned-up
+                _currentReader?.Dispose();
+                _currentReader = null;
 

Review Comment:
   Actually, this problem will continue to the next Statement using the 
connection, since new Clients are made per Connection (not per statement). 
   
   statement1 = connection.newstatement()
   statement1.dispose() // connection's thrift client could be corrupted here
   statement2 = connection.newstatement()
   // now statement2's client is unusable
   
   I think the quickest solution here is to not cancel the request, just let it 
go through and timeout naturally.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to