You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2025/07/02 19:14:35 UTC

[PR] Modified SystemConfiguration to track property change usage [accumulo]

dlmarion opened a new pull request, #5708:
URL: https://github.com/apache/accumulo/pull/5708

   SystemConfiguration will track and warn when server related property changes are made, but not used.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3032932270

   > > Draft to get consensus on the approach before proceeding.
   > 
   > The approach seems good to me. Seems like it could potentially spam the logs, but that can be improved if it does.
   
   Okay, I'll keep working on this draft then.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion closed pull request #5708: Modified SystemConfiguration to track property change usage
URL: https://github.com/apache/accumulo/pull/5708


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3032677147

   > Draft to get consensus on the approach before proceeding.  
   
   The approach seems good to me.  Seems like it could potentially spam the logs, but that can be improved if it does.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3029053354

   Started working on an implementation of an idea made in https://github.com/apache/accumulo/issues/5693#issuecomment-3028269646. It's not fully wired up and the fixed runtime properties have not been removed. Draft to get consensus on the approach before proceeding.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "ctubbsii (via GitHub)" <gi...@apache.org>.
ctubbsii commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3050400250

   > When testing 2.1.4-rc0 I tried to set `compactor.wait.time.job.max` in the shell and that was not allowed. Looking at the code, its constantly reading that prop. So it seems like it would have been ok to set that prop in the shell. Mentioning because it seems related to the goals of this change, also I need to open an issue about that.
   
   I remember discussing this at some point about compactor configs being explicitly excluded because we have no way to configure resource groups for compactors independently in ZooKeeper. The same is technically true for other server types in resource groups, but other server types don't depend as heavily on resource groups as compactors, and also predate resource groups, so we're kinda stuck with the history of those. I think we need the ability to configure resource groups independently in ZK without clobbering per-resource group configs with a global setting, which would help with this. If we had that, we could safely allow compactor configs in ZK too.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3032929571

   > When testing 2.1.4-rc0 I tried to set `compactor.wait.time.job.max` in the shell and that was not allowed. Looking at the code, its constantly reading that prop. So it seems like it would have been ok to set that prop in the shell. Mentioning because it seems related to the goals of this change, also I need to open an issue about that.
   
   It looks like that's because the compactor prefix (or specific compactor properties) are not in `Property.isValidZooPropertyKey`.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#discussion_r2183005955


##########
server/base/src/main/java/org/apache/accumulo/server/conf/SystemConfiguration.java:
##########
@@ -18,36 +18,144 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.COMPACTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.GARBAGE_COLLECTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MANAGER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MONITOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.SCAN_SERVER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.TABLET_SERVER;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.accumulo.core.client.admin.servers.ServerId;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.conf.store.SystemPropKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.MapDifference;
+import com.google.common.collect.Maps;
+
 public class SystemConfiguration extends ZooBasedConfiguration {
 
   private static final Logger log = LoggerFactory.getLogger(SystemConfiguration.class);
 
+  private static class ChangedPropertyMonitor implements Runnable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ChangedPropertyMonitor.class);
+    private static Map<ServerId.Type,List<Property>> SERVER_PROPERTY_PREFIXES = Map.of(COMPACTOR,
+        List.of(Property.COMPACTOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        GARBAGE_COLLECTOR,
+        List.of(Property.GC_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MANAGER,
+        List.of(Property.MANAGER_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MONITOR,
+        List.of(Property.MONITOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        SCAN_SERVER, List.of(Property.SSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        TABLET_SERVER,
+        List.of(Property.TSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX));
+
+    private final AtomicReference<Set<String>> propsChanged = new AtomicReference<>(Set.of());
+    private final List<Property> applicableProperties;
+    private volatile Map<String,String> currentProperties;
+    private volatile long currentVersion;
+
+    public ChangedPropertyMonitor(long initialVersion, Map<String,String> initialProperties,
+        ServerId.Type serverType) {
+      this.applicableProperties = SERVER_PROPERTY_PREFIXES.get(serverType);
+      this.currentProperties = initialProperties;
+      this.currentVersion = initialVersion;
+    }
+
+    private void changedProperties(Set<String> props) {
+      final Set<String> changed = new HashSet<>();
+      props.forEach(p -> {
+        applicableProperties.forEach(ap -> {
+          if (p.startsWith(ap.getKey())) {
+            changed.add(p);
+          }
+        });
+      });
+      propsChanged.set(changed);
+    }
+
+    public void update(long version, Map<String,String> properties) {

Review Comment:
   Multiple threads reading configuration could end up in this code at the same time. There are multiple variables being read and written so it seems like this method and other methods in the class should be synchronized to consistently set all the variables.
   
   ```suggestion
       public synchronized void update(long version, Map<String,String> properties) {
   ```



##########
server/base/src/main/java/org/apache/accumulo/server/conf/SystemConfiguration.java:
##########
@@ -18,36 +18,144 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.COMPACTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.GARBAGE_COLLECTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MANAGER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MONITOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.SCAN_SERVER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.TABLET_SERVER;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.accumulo.core.client.admin.servers.ServerId;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.conf.store.SystemPropKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.MapDifference;
+import com.google.common.collect.Maps;
+
 public class SystemConfiguration extends ZooBasedConfiguration {
 
   private static final Logger log = LoggerFactory.getLogger(SystemConfiguration.class);
 
+  private static class ChangedPropertyMonitor implements Runnable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ChangedPropertyMonitor.class);
+    private static Map<ServerId.Type,List<Property>> SERVER_PROPERTY_PREFIXES = Map.of(COMPACTOR,
+        List.of(Property.COMPACTOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        GARBAGE_COLLECTOR,
+        List.of(Property.GC_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MANAGER,
+        List.of(Property.MANAGER_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MONITOR,
+        List.of(Property.MONITOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        SCAN_SERVER, List.of(Property.SSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        TABLET_SERVER,
+        List.of(Property.TSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX));
+
+    private final AtomicReference<Set<String>> propsChanged = new AtomicReference<>(Set.of());
+    private final List<Property> applicableProperties;
+    private volatile Map<String,String> currentProperties;
+    private volatile long currentVersion;
+
+    public ChangedPropertyMonitor(long initialVersion, Map<String,String> initialProperties,
+        ServerId.Type serverType) {
+      this.applicableProperties = SERVER_PROPERTY_PREFIXES.get(serverType);
+      this.currentProperties = initialProperties;
+      this.currentVersion = initialVersion;
+    }
+
+    private void changedProperties(Set<String> props) {
+      final Set<String> changed = new HashSet<>();
+      props.forEach(p -> {
+        applicableProperties.forEach(ap -> {
+          if (p.startsWith(ap.getKey())) {
+            changed.add(p);
+          }
+        });
+      });
+      propsChanged.set(changed);
+    }
+
+    public void update(long version, Map<String,String> properties) {
+      if (currentVersion == version) {
+        return;
+      }
+      MapDifference<String,String> diff = Maps.difference(currentProperties, properties);
+      currentProperties = properties;
+      currentVersion = version;
+      if (diff.areEqual()) {
+        return;
+      }
+      changedProperties(diff.entriesDiffering().keySet());
+    }
+
+    public void propChecked(Property p) {
+      final Set<String> changed = propsChanged.get();
+      if (changed.isEmpty()) {
+        return;
+      }
+      propsChanged.get().remove(p.getKey());
+    }
+
+    @Override
+    public void run() {
+      final Set<String> changed = propsChanged.get();
+      if (!changed.isEmpty()) {
+        LOG.warn("The following properties have changed, but have not yet been read: {}", changed);
+      }
+    }
+
+  }
+
+  private final Map<String,String> initialProperties;
   private final RuntimeFixedProperties runtimeFixedProps;
+  private final ChangedPropertyMonitor monitor;
 
   public SystemConfiguration(ServerContext context, SystemPropKey propStoreKey,
       AccumuloConfiguration parent) {
+    this(context, propStoreKey, parent, Optional.empty());
+  }
+
+  public SystemConfiguration(ServerContext context, SystemPropKey propStoreKey,
+      AccumuloConfiguration parent, Optional<ServerId.Type> serverType) {
     super(log, context, propStoreKey, parent);
-    runtimeFixedProps = new RuntimeFixedProperties(getSnapshot(), context.getSiteConfiguration());
+    initialProperties = getSnapshot();
+    if (serverType.isPresent()) {
+      monitor =
+          new ChangedPropertyMonitor(getDataVersion(), initialProperties, serverType.orElseThrow());
+      // start the monitor as a scheduled task at some interval.

Review Comment:
   is this a todo?



##########
server/base/src/main/java/org/apache/accumulo/server/conf/SystemConfiguration.java:
##########
@@ -18,36 +18,144 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.COMPACTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.GARBAGE_COLLECTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MANAGER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MONITOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.SCAN_SERVER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.TABLET_SERVER;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.accumulo.core.client.admin.servers.ServerId;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.conf.store.SystemPropKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.MapDifference;
+import com.google.common.collect.Maps;
+
 public class SystemConfiguration extends ZooBasedConfiguration {
 
   private static final Logger log = LoggerFactory.getLogger(SystemConfiguration.class);
 
+  private static class ChangedPropertyMonitor implements Runnable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ChangedPropertyMonitor.class);
+    private static Map<ServerId.Type,List<Property>> SERVER_PROPERTY_PREFIXES = Map.of(COMPACTOR,
+        List.of(Property.COMPACTOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        GARBAGE_COLLECTOR,
+        List.of(Property.GC_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MANAGER,
+        List.of(Property.MANAGER_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MONITOR,
+        List.of(Property.MONITOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        SCAN_SERVER, List.of(Property.SSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        TABLET_SERVER,
+        List.of(Property.TSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX));
+
+    private final AtomicReference<Set<String>> propsChanged = new AtomicReference<>(Set.of());
+    private final List<Property> applicableProperties;
+    private volatile Map<String,String> currentProperties;
+    private volatile long currentVersion;
+
+    public ChangedPropertyMonitor(long initialVersion, Map<String,String> initialProperties,
+        ServerId.Type serverType) {
+      this.applicableProperties = SERVER_PROPERTY_PREFIXES.get(serverType);
+      this.currentProperties = initialProperties;
+      this.currentVersion = initialVersion;
+    }
+
+    private void changedProperties(Set<String> props) {
+      final Set<String> changed = new HashSet<>();
+      props.forEach(p -> {
+        applicableProperties.forEach(ap -> {
+          if (p.startsWith(ap.getKey())) {
+            changed.add(p);
+          }
+        });
+      });
+      propsChanged.set(changed);
+    }
+
+    public void update(long version, Map<String,String> properties) {
+      if (currentVersion == version) {
+        return;
+      }
+      MapDifference<String,String> diff = Maps.difference(currentProperties, properties);
+      currentProperties = properties;
+      currentVersion = version;
+      if (diff.areEqual()) {
+        return;
+      }
+      changedProperties(diff.entriesDiffering().keySet());
+    }
+
+    public void propChecked(Property p) {
+      final Set<String> changed = propsChanged.get();
+      if (changed.isEmpty()) {
+        return;
+      }
+      propsChanged.get().remove(p.getKey());
+    }
+
+    @Override
+    public void run() {

Review Comment:
   Not seeing the code that starts a thread or timer task to call this.



##########
server/base/src/main/java/org/apache/accumulo/server/conf/SystemConfiguration.java:
##########
@@ -18,36 +18,144 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.COMPACTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.GARBAGE_COLLECTOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MANAGER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.MONITOR;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.SCAN_SERVER;
+import static org.apache.accumulo.core.client.admin.servers.ServerId.Type.TABLET_SERVER;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.apache.accumulo.core.client.admin.servers.ServerId;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.ServerContext;
 import org.apache.accumulo.server.conf.store.SystemPropKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.MapDifference;
+import com.google.common.collect.Maps;
+
 public class SystemConfiguration extends ZooBasedConfiguration {
 
   private static final Logger log = LoggerFactory.getLogger(SystemConfiguration.class);
 
+  private static class ChangedPropertyMonitor implements Runnable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(ChangedPropertyMonitor.class);
+    private static Map<ServerId.Type,List<Property>> SERVER_PROPERTY_PREFIXES = Map.of(COMPACTOR,
+        List.of(Property.COMPACTOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        GARBAGE_COLLECTOR,
+        List.of(Property.GC_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MANAGER,
+        List.of(Property.MANAGER_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX), MONITOR,
+        List.of(Property.MONITOR_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        SCAN_SERVER, List.of(Property.SSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX),
+        TABLET_SERVER,
+        List.of(Property.TSERV_PREFIX, Property.RPC_PREFIX, Property.INSTANCE_PREFIX));
+
+    private final AtomicReference<Set<String>> propsChanged = new AtomicReference<>(Set.of());
+    private final List<Property> applicableProperties;
+    private volatile Map<String,String> currentProperties;
+    private volatile long currentVersion;
+
+    public ChangedPropertyMonitor(long initialVersion, Map<String,String> initialProperties,
+        ServerId.Type serverType) {
+      this.applicableProperties = SERVER_PROPERTY_PREFIXES.get(serverType);
+      this.currentProperties = initialProperties;
+      this.currentVersion = initialVersion;
+    }
+
+    private void changedProperties(Set<String> props) {
+      final Set<String> changed = new HashSet<>();
+      props.forEach(p -> {
+        applicableProperties.forEach(ap -> {
+          if (p.startsWith(ap.getKey())) {
+            changed.add(p);
+          }
+        });
+      });
+      propsChanged.set(changed);
+    }
+
+    public void update(long version, Map<String,String> properties) {
+      if (currentVersion == version) {
+        return;
+      }
+      MapDifference<String,String> diff = Maps.difference(currentProperties, properties);
+      currentProperties = properties;
+      currentVersion = version;
+      if (diff.areEqual()) {
+        return;
+      }
+      changedProperties(diff.entriesDiffering().keySet());

Review Comment:
   javadoc for entriesDiffering is :
   
   ```
   Returns an unmodifiable map describing keys that appear in both maps, but with different values
   ```
   
   So maybe if there is a new prop that was not present in the old map it would not be seen.  Should this be something like the following?
   
   ```java
   Sets.union(diff.entriesDiffering().keySet(), diff.entriesOnlyOnRight().keySet())
   ```



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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3046450454

   @keith-turner  - I think I addressed your comments in the changes in commit 8b4b0ef.
   
   `Property.isFixedZooProperty` is used to:
     1. log a warning in the Shell when changing a fixed property (ConfigCommand)
     2. log a warning in the Manager log when a fixed property is updated (SystemPropUtil.logIfFixed)
     3. mark properties as mutable in the generated documentation (ConfigurationDocGen)
     
   Since the code does not currently prevent a fixed property from being changed, `RuntimeFixedProperties` was used to return static property values for fixed properties.
   
   In 8b4b0ef, I removed `RuntimeFixedProperties` allowing properties to change values and allowing the determination of whether something is fixed or not to whether or not the code checks the value again. The `SystemConfiguration.ChangedPropertyMonitor` will log when property values have been changed but not read.
   
   I'm trying to figure out what to do with the `Property.FIXED_PROPERTIES` set. I don't have an issue removing the logging mentioned in 1 and 2 above, but wonder how we want to handle the user documentation. Certainly there are properties that are fixed (rpc, instance, port properties, block cache properties, etc.).
   
   My current thought is to remove `Property.FIXED_PROPERTIES` because almost everything is updateable and the code that enforced a static view was just removed. Instead, I'm thinking of adding an annotation to each Property to document the scope of the property. For example, rpc , instance, port properties, block cache properties, etc. have a PROCESS scope. Other properties, like MANAGER_BULK_TIMEOUT, may have a SESSION scope where they are checked each time. Maybe there are other values for other cases. If no annotation is supplied, then maybe there is a default value which means that its configurable. This approach continues to allow us to provide documentation, but if the annotation is wrong it's a documentation problem and doesn't affect the behavior of the code.
   
   


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3046637495

   > My current thought is to remove `Property.FIXED_PROPERTIES` because almost everything is updateable and the code that enforced a static view was just removed. Instead, I'm thinking of adding an annotation to each Property to document the scope of the property. For example, rpc , instance, port properties, block cache properties, etc. have a PROCESS scope. Other properties, like MANAGER_BULK_TIMEOUT, may have a SESSION scope where they are checked each time. Maybe there are other values for other cases. If no annotation is supplied, then maybe there is a default value which means that its configurable. This approach continues to allow us to provide documentation, but if the annotation is wrong it's a documentation problem and doesn't affect the behavior of the code.
   
   5a0c845 is an example of what I was trying to describe. I updated a bunch, but not all, of the properties with the PropertyScope annotation.


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


Re: [PR] Modified SystemConfiguration to track property change usage [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on PR #5708:
URL: https://github.com/apache/accumulo/pull/5708#issuecomment-3053464014

   I talked with @ctubbsii about this and I'm fine with closing this and instead adding a parameter to each Property to specify whether it's fixed or not, and removing the fixed properties set in Property.java


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