jduo commented on a change in pull request #7994:
URL: https://github.com/apache/arrow/pull/7994#discussion_r476883835
##########
File path:
java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/ServerInterceptorAdapter.java
##########
@@ -87,10 +87,12 @@ public ServerInterceptorAdapter(List<KeyFactory<?>>
factories) {
// Use LinkedHashMap to preserve insertion order
final Map<FlightServerMiddleware.Key<?>, FlightServerMiddleware>
middlewareMap = new LinkedHashMap<>();
final MetadataAdapter headerAdapter = new MetadataAdapter(headers);
+ Context currentContext = Context.current();
for (final KeyFactory<?> factory : factories) {
final FlightServerMiddleware m;
try {
m = factory.factory.onCallStarted(info, headerAdapter);
+ currentContext = m.onAuthenticationSuccess(currentContext);
Review comment:
The issue here is there's no way to alter the Context from
onCallStarted. We can get the context but can't get the
ServerInterceptorAdapter to use the context.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]