fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads#1547
Conversation
| _putenv_s("GRPC_DNS_RESOLVER", "native"); | ||
| #else | ||
| setenv("GRPC_DNS_RESOLVER", "native", 1); | ||
| #endif |
There was a problem hiding this comment.
You will need to clear the cached stream:
stmt_handle.ClearReadRowsStream();
stmt_handle.ClearReadRowsIterator();
for the subsequent calls of ReadNextResultsFromStream to work.
There was a problem hiding this comment.
I missed that you made changes in google/cloud/odbc/bq_driver/internal/odbc_sql_execute_utils.cc.
The fix has to be done during SQLExecute and no change duiring SQLFetch is needed.
There was a problem hiding this comment.
Have verified but setting env variable on the fly like this, don't switch the GRPC channel , it still uses the one from which it was created by the library, We can either close the older channel and recreate the client which can have issue with multithreading or we can set the DNS resolver to native windows one at the start itself in all cases. @sachinpro . We can take a call.
There was a problem hiding this comment.
Lets set the DNS resolver to native windows in all cases. Thanks for verifying this.
|
@shivamd-gpartner @Anshu6250 I have simplified the logic here. Can you please manually verify if it works? |
|
|
I am merging this since it is a safe change. The GHA checks were successful. |
Sorry, I missed this reply. Are you sure You might've tested with your previous logic. Can you test with the latest changes on main? |
No description provided.