This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 68ca8c1 Add check for deleted Table to Tablet compactAll (#2262)
68ca8c1 is described below
commit 68ca8c1c584d7987602a8c1dd901c45d0f9cd7ad
Author: Mike Miller <[email protected]>
AuthorDate: Tue Sep 7 09:47:07 2021 -0400
Add check for deleted Table to Tablet compactAll (#2262)
* Also drop unnecessary boolean and add comment
---
.../main/java/org/apache/accumulo/tserver/tablet/Tablet.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 360ac77..709ed43 100644
---
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -2096,8 +2096,6 @@ public class Tablet {
public void compactAll(long compactionId, CompactionConfig compactionConfig)
{
- boolean shouldInitiate = false;
-
synchronized (this) {
if (lastCompactID >= compactionId) {
return;
@@ -2116,17 +2114,13 @@ public class Tablet {
}
}
- if (isClosing() || isClosed()) {
+ if (isClosing() || isClosed() || isBeingDeleted()) {
return;
}
-
- shouldInitiate = true;
-
}
- if (shouldInitiate) {
- compactable.initiateUserCompaction(compactionId, compactionConfig);
- }
+ // passed all verification checks so initiate compaction
+ compactable.initiateUserCompaction(compactionId, compactionConfig);
}
public TableConfiguration getTableConfiguration() {