You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/01/21 21:27:57 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #2425: Separate native map loading from native map code

ctubbsii commented on a change in pull request #2425:
URL: https://github.com/apache/accumulo/pull/2425#discussion_r790006700



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
##########
@@ -253,8 +254,10 @@ public TabletServerResourceManager(ServerContext context) {
     final AccumuloConfiguration acuConf = context.getConfiguration();
 
     long maxMemory = acuConf.getAsBytes(Property.TSERV_MAXMEM);
-    boolean usingNativeMap =
-        acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED) && NativeMap.isLoaded();
+    boolean usingNativeMap = acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED);
+    if (usingNativeMap) {
+      NativeMapLoader.load();

Review comment:
       No, because I baked in a `load only once` mechanism with an `AtomicBoolean`. My concern with removing this here would be that it may take some time before the `NativeMap` class is referenced, and therefore it might not exit right away. We currently have fast failure, because `NativeMap` is referenced here in the code I changed. So, when the tserver is starting up and creates an instance of this resource manager object, it will fail right away if the native maps can't be loaded. Keeping this here preserves that same fast-failure behavior.




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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org