This is an automated email from the ASF dual-hosted git repository.
taklwu pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new d2fa02574e8 HBASE-29544: Assertion errors in BackupAndRestoreThread
are not causing IntegrationTestBackupRestore to fail (#7243) (#7249)
d2fa02574e8 is described below
commit d2fa02574e882dd89d83f972ed830ebf8d1c7cd3
Author: Kevin Geiszler <[email protected]>
AuthorDate: Tue Aug 26 15:09:30 2025 -0700
HBASE-29544: Assertion errors in BackupAndRestoreThread are not causing
IntegrationTestBackupRestore to fail (#7243) (#7249)
Signed-off-by: Tak Lon (Stephen) Wu <[email protected]>
---
.../hadoop/hbase/IntegrationTestBackupRestore.java | 30 +++++++++++-----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git
a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBackupRestore.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBackupRestore.java
index 5857182ba11..f910df67200 100644
---
a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBackupRestore.java
+++
b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestBackupRestore.java
@@ -110,26 +110,26 @@ public class IntegrationTestBackupRestore extends
IntegrationTestBase {
*/
protected class BackupAndRestoreThread implements Runnable {
private final TableName table;
- private Exception exc;
+ private Throwable throwable;
public BackupAndRestoreThread(TableName table) {
this.table = table;
- this.exc = null;
+ this.throwable = null;
}
- public Exception getException() {
- return this.exc;
+ public Throwable getThrowable() {
+ return this.throwable;
}
@Override
public void run() {
try {
runTestSingle(this.table);
- } catch (Exception e) {
+ } catch (Throwable t) {
LOG.error(
- "An exception occurred in thread {} when performing a backup and
restore with table {}: ",
- Thread.currentThread().getName(), this.table.getNameAsString(), e);
- this.exc = e;
+ "An error occurred in thread {} when performing a backup and restore
with table {}: ",
+ Thread.currentThread().getName(), this.table.getNameAsString(), t);
+ this.throwable = t;
}
}
}
@@ -219,23 +219,23 @@ public class IntegrationTestBackupRestore extends
IntegrationTestBase {
workers[i].start();
}
// Wait for all workers to finish and check for errors
- Exception error = null;
- Exception threadExc;
+ Throwable error = null;
+ Throwable threadThrowable;
for (int i = 0; i < numTables; i++) {
Uninterruptibles.joinUninterruptibly(workers[i]);
- threadExc = backupAndRestoreThreads[i].getException();
- if (threadExc == null) {
+ threadThrowable = backupAndRestoreThreads[i].getThrowable();
+ if (threadThrowable == null) {
continue;
}
if (error == null) {
- error = threadExc;
+ error = threadThrowable;
} else {
- error.addSuppressed(threadExc);
+ error.addSuppressed(threadThrowable);
}
}
// Throw any found errors after all threads have completed
if (error != null) {
- throw error;
+ throw new AssertionError("An error occurred in a backup and restore
thread", error);
}
LOG.info("IT backup & restore finished");
}