You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ps...@apache.org on 2021/07/22 08:16:44 UTC
[hbase] branch master updated: HBASE-26107 MOB compaction with
missing files catches incorrect exception (#3511)
This is an automated email from the ASF dual-hosted git repository.
psomogyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 3c70bc1 HBASE-26107 MOB compaction with missing files catches incorrect exception (#3511)
3c70bc1 is described below
commit 3c70bc1f312bd2a833d408c3af82731e5fee66ea
Author: Peter Somogyi <ps...@apache.org>
AuthorDate: Thu Jul 22 10:16:03 2021 +0200
HBASE-26107 MOB compaction with missing files catches incorrect exception (#3511)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Pankaj Kumar <pa...@apache.org>
---
.../org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java | 8 +++++---
.../org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java | 10 ++++++----
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
index 0531b13..c45fdff 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java
@@ -35,6 +35,7 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.DoNotRetryIOException;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.PrivateCellUtil;
import org.apache.hadoop.hbase.TableName;
@@ -371,12 +372,13 @@ public class DefaultMobStoreCompactor extends DefaultCompactor {
// Added to support migration
try {
mobCell = mobStore.resolve(c, true, false).getCell();
- } catch (FileNotFoundException fnfe) {
- if (discardMobMiss) {
+ } catch (DoNotRetryIOException e) {
+ if (discardMobMiss && e.getCause() != null
+ && e.getCause() instanceof FileNotFoundException) {
LOG.error("Missing MOB cell: file={} not found cell={}", fName, c);
continue;
} else {
- throw fnfe;
+ throw e;
}
}
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java
index a5f8069..50530da 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java
@@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.DoNotRetryIOException;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.PrivateCellUtil;
import org.apache.hadoop.hbase.TableName;
@@ -192,12 +193,13 @@ public class FaultyMobStoreCompactor extends DefaultMobStoreCompactor {
// Added to support migration
try {
mobCell = mobStore.resolve(c, true, false).getCell();
- } catch (FileNotFoundException fnfe) {
- if (discardMobMiss) {
- LOG.error("Missing MOB cell: file={} not found", fName);
+ } catch (DoNotRetryIOException e) {
+ if (discardMobMiss && e.getCause() != null
+ && e.getCause() instanceof FileNotFoundException) {
+ LOG.error("Missing MOB cell: file={} not found cell={}", fName, c);
continue;
} else {
- throw fnfe;
+ throw e;
}
}