You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dl...@apache.org on 2021/04/12 15:40:58 UTC
[accumulo] branch 1451-external-compactions-feature updated: closes
#2003 - don't cancel compactions when tserver deleted from live tserver set
This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 1451-external-compactions-feature
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1451-external-compactions-feature by this push:
new 6530799 closes #2003 - don't cancel compactions when tserver deleted from live tserver set
6530799 is described below
commit 6530799b4f6410e066cd6882365f107b483530f2
Author: Dave Marion <dl...@apache.org>
AuthorDate: Mon Apr 12 15:40:04 2021 +0000
closes #2003 - don't cancel compactions when tserver deleted from live tserver set
---
.../coordinator/CompactionCoordinator.java | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
index f7c1e8c..8f1705a 100644
--- a/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
+++ b/server/compaction-coordinator/src/main/java/org/apache/accumulo/coordinator/CompactionCoordinator.java
@@ -430,17 +430,8 @@ public class CompactionCoordinator extends AbstractServer
// run() will iterate over the current and added tservers and add them to the internal
// data structures. For tservers that are deleted, we need to remove them from QUEUES
- // and INDEX and cancel and RUNNING compactions as we currently don't have a way
- // to notify a tabletserver that a compaction has completed when the tablet is re-hosted.
+ // and INDEX
deleted.forEach(tsi -> {
- // Find any running compactions for the tserver
- final List<ExternalCompactionId> toCancel = new ArrayList<>();
- RUNNING.forEach((k, v) -> {
- if (v.getTserver().equals(tsi)) {
- toCancel.add(k);
- }
- });
- // Remove the tserver from the QUEUES and INDEX
INDEX.get(tsi).forEach(qp -> {
TreeMap<Long,LinkedHashSet<TServerInstance>> m = QUEUES.get(qp.getQueue());
if (null != m) {
@@ -448,20 +439,11 @@ public class CompactionCoordinator extends AbstractServer
if (null != tservers) {
synchronized (qp) {
tservers.remove(tsi);
- INDEX.remove(tsi);
}
}
}
});
- // Cancel running compactions
- toCancel.forEach(id -> {
- try {
- cancelCompaction(id.canonical());
- } catch (TException e) {
- LOG.error("Error cancelling running compaction {} due to tserver {} removal.", id, tsi,
- e);
- }
- });
+ INDEX.remove(tsi);
});
}