New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop tracking last compactor check-in for non-existent groups #4403
base: elasticity
Are you sure you want to change the base?
Stop tracking last compactor check-in for non-existent groups #4403
Conversation
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
Seems like there is an existing catch-22 in the code that we may want to fix. The existing problem is that if a compactor has never checked in for a group then there will be no entry in TIME_COMPACTOR_LAST_CHECKED and no warning will ever be logged. So then groups that have jobs queued and are never being serviced will never get a warning logged. Wondering if we can fix the current code and do the needed cleanup of private void idleCompactionWarning() {
// The set of groups that currently have >0 jobs queued
Set<CompactorGroupId> queuedGroups = jobQueues.getCurrentActiveGroups();
// The set of groups that have >0 live compactors w/ a ZK lock. These are groups that have running compactors.
Set<CompactorGroupId> liveGroups = getLiveGroups();
long now = System.currentTimeMillis();
for(var groupName : queuedGroups) {
// If the group has running compactors then do not want to log a warning. Looking for groups that have jobs queued, no compactors running, and the situation has been like this for a while.
if(!liveGroups.contains(groupName)) {
long lastCheckTime = TIME_COMPACTOR_LAST_CHECKED.getOrDefault(groupName, 0);
if ((now - lastCheckTime) > getMissingCompactorWarningTime()){
LOG.warn("No compactors have checked in with coordinator for group {} in {}ms", groupName,
getMissingCompactorWarningTime());
}
}
}
// Only care about tracking check in times for groups with compactions currently queued
TIME_COMPACTOR_LAST_CHECKED.keySet().retainAll(queuedGroups);
} |
We have the following maintenance tasks running in the Coordinator.
I'm thinking that we might be able to combine the last 4 into one method. |
Something like:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consolidating some of the periodic task is nice
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java
Outdated
Show resolved
Hide resolved
I believe this is complete, just waiting on some changes from @ddanielr that have to do with the compaction configuration changes. |
No description provided.