You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Java] JDBC driver does not send custom headers on DoGet #33953
Ok so this one is a little bit beyond me as I'm not very familiar with gRPC but I believe the problem lies in FlightClient.interceptedChannel.
The handshake and sql info methods both use CallOptions.wrapStub(blockingStub, options).get<method>, which internally uses the Channel on the stub. getStream however, uses the interceptedChannel. If I replace it with CallOptions.wrapStub(asyncStub, options).getChannel() it seems to send the headers along, see: this commit
There's a few other methods in the FlightClient that use the interceptedChannel so those might also be worth a look.
BTW, #33839 might be the same issue based on these findings.
After looking at it further, it looks like all the stubs are generated from the interceptedChannel so there shouldn't be any issues with doing this everywhere. Submitted a PR.
Activity
aiguofer commentedon Feb 1, 2023
Ok so this one is a little bit beyond me as I'm not very familiar with gRPC but I believe the problem lies in
FlightClient.interceptedChannel.The handshake and sql info methods both use
CallOptions.wrapStub(blockingStub, options).get<method>, which internally uses theChannelon the stub.getStreamhowever, uses theinterceptedChannel. If I replace it withCallOptions.wrapStub(asyncStub, options).getChannel()it seems to send the headers along, see: this commitThere's a few other methods in the
FlightClientthat use theinterceptedChannelso those might also be worth a look.BTW, #33839 might be the same issue based on these findings.
aiguofer commentedon Feb 1, 2023
After looking at it further, it looks like all the stubs are generated from the
interceptedChannelso there shouldn't be any issues with doing this everywhere. Submitted a PR.GH-33953: [Java] Pass custom headers on every request (#33967)
apacheGH-33953: [Java] Pass custom headers on every request (apache#3…