Skip to content

fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads#1547

Draft
Anshu6250 wants to merge 8 commits into
mainfrom
dns_issueee
Draft

fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads#1547
Anshu6250 wants to merge 8 commits into
mainfrom
dns_issueee

Conversation

@Anshu6250
Copy link
Copy Markdown
Collaborator

No description provided.

@Anshu6250 Anshu6250 changed the title test fix: Set native gRPC DNS resolver for HTAPI reads Jun 1, 2026
@Anshu6250 Anshu6250 changed the title fix: Set native gRPC DNS resolver for HTAPI reads fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads Jun 1, 2026
@Anshu6250 Anshu6250 changed the title fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads fix(bq_driver) : Set native gRPC DNS resolver for HTAPI reads Jun 1, 2026
@Anshu6250 Anshu6250 changed the title fix(bq_driver) : Set native gRPC DNS resolver for HTAPI reads fix(bq_driver): Set native gRPC DNS resolver for HTAPI reads Jun 1, 2026
_putenv_s("GRPC_DNS_RESOLVER", "native");
#else
setenv("GRPC_DNS_RESOLVER", "native", 1);
#endif
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to clear the cached stream:

    stmt_handle.ClearReadRowsStream();
    stmt_handle.ClearReadRowsIterator();

for the subsequent calls of ReadNextResultsFromStream to work.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@sachinpro sachinpro Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets set the DNS resolver to native windows in all cases. Thanks for verifying this.

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

Successfully merging this pull request may close these issues.

3 participants