lidavidm commented on a change in pull request #8586:
URL: https://github.com/apache/arrow/pull/8586#discussion_r517681068
##########
File path:
java/flight/flight-core/src/main/java/org/apache/arrow/flight/grpc/RequestContextAdapter.java
##########
@@ -30,7 +30,7 @@
*/
public class RequestContextAdapter implements RequestContext {
public static final Context.Key<RequestContext> REQUEST_CONTEXT_KEY =
- Context.key("arrow-flight-request-context");
+ Context.keyWithDefault("arrow-flight-request-context", new
RequestContextAdapter());
Review comment:
Sorry - now that I think about this again, this is shared mutable state,
so wouldn't it be possible (though unlikely) for different calls to persist
data into this instance of RequestContextAdapter? It might be better to leave
this nullable and check usages of it instead.
----------------------------------------------------------------
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]