ctubbsii commented on issue #2148:
URL: https://github.com/apache/accumulo/issues/2148#issuecomment-856334478


   "4" in this case would have been interpreted as "4 bytes" since it is 
(presumably) `PropertyType.BYTES`. It can be hard to write general rules to 
detect and validate these kinds of things, because we don't know what the user 
had in mind, and the range of sane values is probably different for each 
individual property, and highly environment-specific. Additionally, special 
values, like "0" might have specific semantics (like deferring to a hard-coded 
default).
   
   We could try to code in range constraints to every property that takes a 
numeric value... which might be tedious, and also might be unnecessarily 
constraining. After all, "4 bytes" is clearly wrong on a production system, but 
who is to say that "4 bytes" isn't a valid value for testing WAL rollover or 
specific failure conditions? And, what should the minimize permitted value 
actually be here? 1MB? Less? More? I'm not sure.
   
   Having a good error message when the value results in a problem, might be 
the best option, rather than trying to determine the best range constraint... 
at least in the general case.


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