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



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
##########
@@ -213,6 +216,11 @@ private static ScanDispatcher 
createScanDispatcher(AccumuloConfiguration conf,
         
conf.getAllPropertiesWithPrefixStripped(Property.TABLE_SCAN_DISPATCHER_OPTS);
 
     newDispatcher.init(new ScanDispatcher.InitParameters() {
+
+      // scan dispatcher are in the critical path for scans, so only create 
ServiceEnv if needed.
+      private final Supplier<ServiceEnvironment> senvSupplier =
+          Suppliers.memoize(() -> new ServiceEnvironmentImpl(context));

Review comment:
       The default scan dispatcher does not use the service env during init().  
However this should only be called when config changes, so thinking that 
memoize is not needed here.




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