bharathv commented on a change in pull request #3204:
URL: https://github.com/apache/hbase/pull/3204#discussion_r625358260
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
##########
@@ -653,6 +658,30 @@ public void regionServerRemoved(String regionserver) {
transferQueues(regionserver);
}
+ /**
+ * We want to run the peer removal in a separate thread when the peer removal
+ * is called from ReplicationSource shipper thread on encountering
NoNodeException
+ * because peerRemoved terminate the source which might leave replication
source
+ * in orphaned state.
+ * See HBASE-25741.
+ * @param peerId peer ID to be removed.
+ */
+ public void schedulePeerRemoval(final String peerId) {
+ final ExecutorService threadPool =
+
Executors.newSingleThreadExecutor(Threads.getNamedThreadFactory("peer-removal"));
+ try {
+ Future<?> res = threadPool.submit(new Runnable() {
+ @Override public void run() {
+ peerRemoved(peerId);
+ }
+ });
+ res.get();
Review comment:
wait.. I don't get this.. the blocking thread here is the shipper
thread, it should be killed before get() returns? How is this any different
from the current state of code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]