keith-turner commented on a change in pull request #2101:
URL: https://github.com/apache/accumulo/pull/2101#discussion_r631953611



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
##########
@@ -783,6 +788,11 @@ public void executeReadAhead(KeyExtent tablet, 
ScanDispatcher dispatcher, ScanSe
       scanExecutors.get("meta").execute(task);
     } else {
       DispatchParameters params = new DispatchParamsImpl() {
+
+        // in scan critical path so only create ServiceEnv if needed
+        private final Supplier<ServiceEnvironment> senvSupplier =
+            Suppliers.memoize(() -> new ServiceEnvironmentImpl(context));

Review comment:
       > Is that right?
   
   That is correct.
   
   > Just a quirk with the current design of the service environment containing 
snapshots and then caching them.
   
   If it does not exists, probably need better documentation of the lifecycle 
of an instantiated dispatcher.




-- 
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]


Reply via email to