milleruntime commented on a change in pull request #2249:
URL: https://github.com/apache/accumulo/pull/2249#discussion_r697503897
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java
##########
@@ -351,11 +354,12 @@ public void compactableChanged(Compactable compactable) {
compactablesToCheck.add(compactable);
}
- private void checkForConfigChanges() {
+ private synchronized void checkForConfigChanges(boolean force) {
try {
- if (TimeUnit.SECONDS.convert(System.nanoTime() - lastConfigCheckTime,
TimeUnit.NANOSECONDS)
- < 1)
+ if (!force && (TimeUnit.SECONDS.convert(System.nanoTime() -
lastConfigCheckTime,
+ TimeUnit.NANOSECONDS) < 1)) {
Review comment:
I know this is checking time since lastConfigCheckTime but I think doing
the conversion in the boolean makes it hard to read. Would be nice to have
another variable like `secondsSinceLastCheck` set before the check so it reads
easier.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]