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



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
##########
@@ -70,6 +81,20 @@ public static void setSystemProperty(ServerContext context, 
String property, Str
 
   public static void removeSystemProperty(ServerContext context, String 
property)
       throws InterruptedException, KeeperException {
+    AtomicBoolean shouldRemove = new AtomicBoolean(true);
+    DeprecatedPropertyUtil.getReplacementName(property, (log, replacement) -> {
+      log.warn("{} was deprecated and will be removed in a future release;"
+          + " no action was taken because it is not set here;"
+          + " did you mean to remove its replacment {} instead?", property, 
replacement);
+      shouldRemove.set(false);
+    });
+    if (shouldRemove.get()) {
+      removePropWithoutDeprecationWarning(context, property);
+    }

Review comment:
       I think a nice transitional experience is that each manager property has 
a deprecated alias master property that can be used interchangeably(with a 
warning).  This is being achieved for set, but not delete and I think the 
semantics are very confusing. 
   
   > Honestly, I preferred the solution where we just prevent the API from 
being able to set the old master.* property names entirely. 
   
   When I put myself in the shoes of a user, that is not the experience I would 
want.  An experience where code that worked in 2.0 (code written following 
Accumulo documentation) blows up by design in 2.1 (and its only detectable at 
runtime).  As a user I would prefer the experience where it continues to work 
in 2.1 (with warnings) and blows up at runtime in 2.2, 3.0, etc.
   
   If master aliases are only supported for set and not delete, I think it may 
be a less confusing user experience to not support aliases for either set or 
delete and throw errors for both instead.  Errors are not my personal 
preference, but its consistent at least and not confusing.




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