This is an automated email from the ASF dual-hosted git repository.

ddanielr pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 8a724830c0 allow setting table.file.ec.policy to '' (#5945)
8a724830c0 is described below

commit 8a724830c044393319afb3c701937309c657b1db
Author: Keith Turner <[email protected]>
AuthorDate: Mon Oct 27 13:39:28 2025 -0400

    allow setting table.file.ec.policy to '' (#5945)
---
 .../base/src/main/java/org/apache/accumulo/server/util/PropUtil.java | 3 ++-
 .../main/java/org/apache/accumulo/test/compaction/ErasureCodeIT.java | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/PropUtil.java 
b/server/base/src/main/java/org/apache/accumulo/server/util/PropUtil.java
index 260e831a9a..d5776a5850 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/PropUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/PropUtil.java
@@ -78,7 +78,8 @@ public final class PropUtil {
         }
       }
 
-      if (prop.getKey().equals(Property.TABLE_ERASURE_CODE_POLICY.getKey())) {
+      if (prop.getKey().equals(Property.TABLE_ERASURE_CODE_POLICY.getKey())
+          && !prop.getValue().isEmpty()) {
         var volumes = context.getVolumeManager().getVolumes();
         for (var volume : volumes) {
           if (volume.getFileSystem() instanceof DistributedFileSystem) {
diff --git 
a/test/src/main/java/org/apache/accumulo/test/compaction/ErasureCodeIT.java 
b/test/src/main/java/org/apache/accumulo/test/compaction/ErasureCodeIT.java
index 0a4672060b..66ef84d02c 100644
--- a/test/src/main/java/org/apache/accumulo/test/compaction/ErasureCodeIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/compaction/ErasureCodeIT.java
@@ -277,6 +277,11 @@ public class ErasureCodeIT extends ConfigurableMacBase {
       c.tableOperations().setProperty(table1, 
Property.TABLE_ERASURE_CODE_POLICY.getKey(), policy2);
       assertEquals(policy2, c.tableOperations().getConfiguration(table1)
           .get(Property.TABLE_ERASURE_CODE_POLICY.getKey()));
+      // should be able to set it to the default value
+      c.tableOperations().setProperty(table1, 
Property.TABLE_ERASURE_CODE_POLICY.getKey(),
+          Property.TABLE_ERASURE_CODE_POLICY.getDefaultValue());
+      assertEquals(Property.TABLE_ERASURE_CODE_POLICY.getDefaultValue(), 
c.tableOperations()
+          
.getConfiguration(table1).get(Property.TABLE_ERASURE_CODE_POLICY.getKey()));
     }
   }
 }

Reply via email to