Skip to content

Commit

Permalink
HBASE-25012 HBASE-24359 causes replication missed log of some RemoteE…
Browse files Browse the repository at this point in the history
…xception (#2384)

Signed-off-by: Guanghao Zhang <zghao@apache.org>
  • Loading branch information
ddupg authored Sep 16, 2020
1 parent c5ca191 commit a918bf0
Showing 1 changed file with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,20 +542,26 @@ public boolean replicate(ReplicateContext replicateContext) {
parallelReplicate(pool, replicateContext, batches);
return true;
} catch (IOException ioe) {
if (dropOnDeletedTables && isTableNotFoundException(ioe)) {
// Only filter the edits to replicate and don't change the entries in replicateContext
// as the upper layer rely on it.
batches = filterNotExistTableEdits(batches);
if (batches.isEmpty()) {
LOG.warn("After filter not exist table's edits, 0 edits to replicate, just return");
return true;
}
} else if (dropOnDeletedColumnFamilies && isNoSuchColumnFamilyException(ioe)) {
batches = filterNotExistColumnFamilyEdits(batches);
if (batches.isEmpty()) {
LOG.warn(
"After filter not exist column family's edits, 0 edits to replicate, just return");
return true;
if (ioe instanceof RemoteException) {
if (dropOnDeletedTables && isTableNotFoundException(ioe)) {
// Only filter the edits to replicate and don't change the entries in replicateContext
// as the upper layer rely on it.
batches = filterNotExistTableEdits(batches);
if (batches.isEmpty()) {
LOG.warn("After filter not exist table's edits, 0 edits to replicate, just return");
return true;
}
} else if (dropOnDeletedColumnFamilies && isNoSuchColumnFamilyException(ioe)) {
batches = filterNotExistColumnFamilyEdits(batches);
if (batches.isEmpty()) {
LOG.warn("After filter not exist column family's edits, 0 edits to replicate, " +
"just return");
return true;
}
} else {
LOG.warn("{} Peer encountered RemoteException, rechecking all sinks: ", logPeerId(),
ioe);
replicationSinkMgr.chooseSinks();
}
} else {
if (ioe instanceof SocketTimeoutException) {
Expand Down

0 comments on commit a918bf0

Please sign in to comment.