Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-27368 Do not need to throw IllegalStateException when peer is n… #4779

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ WALEntryFilter getWalEntryFilter() {
return walEntryFilter;
}

protected final void uncaughtException(Thread t, Throwable e, ReplicationSourceManager manager,
private void uncaughtException(Thread t, Throwable e, ReplicationSourceManager manager,
String peerId) {
OOMEChecker.exitIfOOME(e, getClass().getSimpleName());
LOG.error("Unexpected exception in {} currentPath={}", t.getName(), getCurrentPath(), e);
Expand Down Expand Up @@ -539,15 +539,10 @@ private void initialize() {
}

if (!this.isSourceActive()) {
// this means the server is shutting down or the source is terminated, just give up
// initializing
setSourceStartupStatus(false);
if (Thread.currentThread().isInterrupted()) {
// If source is not running and thread is interrupted this means someone has tried to
// remove this peer.
return;
}

retryStartup.set(!this.abortOnError);
throw new IllegalStateException("Source should be active.");
return;
}

sleepMultiplier = 1;
Expand All @@ -569,15 +564,12 @@ private void initialize() {
}

if (!this.isSourceActive()) {
// this means the server is shutting down or the source is terminated, just give up
// initializing
setSourceStartupStatus(false);
if (Thread.currentThread().isInterrupted()) {
// If source is not running and thread is interrupted this means someone has tried to
// remove this peer.
return;
}
retryStartup.set(!this.abortOnError);
throw new IllegalStateException("Source should be active.");
return;
}

LOG.info("{} queueId={} (queues={}) is replicating from cluster={} to cluster={}", logPeerId(),
this.replicationQueueInfo.getQueueId(), logQueue.getNumQueues(), clusterId, peerClusterId);
initializeWALEntryFilter(peerClusterId);
Expand Down