Skip to content

Commit 9ae68e4

Browse files
committed
Remove the outermost exception wrapping of the batch
1 parent f474713 commit 9ae68e4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/com/alipay/oceanbase/hbase/OHTable.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ public void batch(final List<? extends Row> actions, final Object[] results) thr
715715
try {
716716
compatOldServerBatch(actions, results, batchError);
717717
} catch (Exception e) {
718-
throw new IOException(e);
718+
throw new IOException(tableNameString + " table occurred unexpected error." , e);
719719
}
720720
} else {
721721
String realTableName = getTargetTableName(actions);
@@ -725,7 +725,7 @@ public void batch(final List<? extends Row> actions, final Object[] results) thr
725725
try {
726726
tmpResults = batch.execute();
727727
} catch (Exception e) {
728-
throw new IOException(e);
728+
throw new IOException(tableNameString + " table occurred unexpected error." , e);
729729
}
730730
int index = 0;
731731
for (int i = 0; i != actions.size(); ++i) {
@@ -1320,7 +1320,6 @@ private void innerDelete(Delete delete) throws IOException {
13201320
batch(actions, results);
13211321
} catch (Exception e) {
13221322
logger.error(LCD.convert("01-00004"), tableNameString, e);
1323-
throw new IOException("delete table " + tableNameString + " error.", e);
13241323
}
13251324
}
13261325

@@ -1607,9 +1606,6 @@ public void flushCommits() throws IOException {
16071606
} catch (Exception e) {
16081607
logger.error(LCD.convert("01-00008"), tableNameString, null, autoFlush,
16091608
writeBuffer.size(), e);
1610-
throw new IOException("put table " + tableNameString + " error codes " + null
1611-
+ "auto flush " + autoFlush + " current buffer size "
1612-
+ writeBuffer.size(), e);
16131609
} finally {
16141610
// mutate list so that it is empty for complete success, or contains
16151611
// only failed records results are returned in the same order as the

0 commit comments

Comments
 (0)