You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by dd...@apache.org on 2024/01/22 18:21:47 UTC
(accumulo) branch main updated: Compaction Failed Logging in TabletLogger (#4153)
This is an automated email from the ASF dual-hosted git repository.
ddanielr 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 731bbf75e7 Compaction Failed Logging in TabletLogger (#4153)
731bbf75e7 is described below
commit 731bbf75e75c38247d13d810de986b2e15659ff6
Author: Kevin Rathbun <43...@users.noreply.github.com>
AuthorDate: Mon Jan 22 13:21:42 2024 -0500
Compaction Failed Logging in TabletLogger (#4153)
Closes #4139
Changes:
- Methods compactionFailed() and externalCompactionFailed() in TabletLogger
- Small change to arg passed to updateTimer()
- Calls to compactionFailed() and externalCompactionFailed() in
CompactableImpl
---
.../java/org/apache/accumulo/core/logging/TabletLogger.java | 13 +++++++++++++
.../org/apache/accumulo/tserver/tablet/CompactableImpl.java | 5 ++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java b/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
index 44832db7f1..d01356cfc7 100644
--- a/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
+++ b/core/src/main/java/org/apache/accumulo/core/logging/TabletLogger.java
@@ -33,6 +33,7 @@ import org.apache.accumulo.core.metadata.CompactableFileImpl;
import org.apache.accumulo.core.metadata.StoredTabletFile;
import org.apache.accumulo.core.metadata.TServerInstance;
import org.apache.accumulo.core.metadata.TabletFile;
+import org.apache.accumulo.core.metadata.schema.ExternalCompactionId;
import org.apache.accumulo.core.spi.compaction.CompactionJob;
import org.apache.accumulo.core.spi.compaction.CompactionKind;
import org.apache.accumulo.core.tabletserver.log.LogEntry;
@@ -148,6 +149,18 @@ public class TabletLogger {
asMinimalString(job.getFiles()));
}
+ public static void compactionFailed(KeyExtent extent, CompactionJob job,
+ CompactionConfig config) {
+ fileLog.debug("Failed to compact: extent: {}, input files: {}, iterators: {}", extent,
+ asMinimalString(job.getFiles()), config.getIterators());
+ }
+
+ public static void externalCompactionFailed(KeyExtent extent, ExternalCompactionId id,
+ CompactionJob job, CompactionConfig config) {
+ fileLog.debug("Failed to compact: id: {}, extent: {}, input files: {}, iterators: {}", id,
+ extent, asMinimalString(job.getFiles()), config.getIterators());
+ }
+
public static void flushed(KeyExtent extent, Optional<StoredTabletFile> newDatafile) {
if (newDatafile.isPresent()) {
fileLog.debug("Flushed {} created {} from [memory]", extent, newDatafile.orElseThrow());
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
index 6aa7401b14..28d6b11977 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
@@ -1108,10 +1108,11 @@ public class CompactableImpl implements Compactable {
log.debug("Compaction canceled {} ", getExtent());
} catch (Exception e) {
newFile = Optional.empty();
+ TabletLogger.compactionFailed(getExtent(), job, cInfo.localCompactionCfg);
throw new RuntimeException(e);
} finally {
completeCompaction(job, cInfo.jobFiles, newFile, successful);
- tablet.updateTimer(MAJOR, queuedTime, startTime, stats.getEntriesRead(), newFile == null);
+ tablet.updateTimer(MAJOR, queuedTime, startTime, stats.getEntriesRead(), newFile.isEmpty());
}
}
@@ -1161,6 +1162,8 @@ public class CompactableImpl implements Compactable {
} catch (Exception e) {
externalCompactions.remove(externalCompactionId);
+ TabletLogger.externalCompactionFailed(getExtent(), externalCompactionId, job,
+ cInfo.localCompactionCfg);
completeCompaction(job, cInfo.jobFiles, Optional.empty(), false);
throw new RuntimeException(e);
}