taklwu commented on code in PR #7617:
URL: https://github.com/apache/hbase/pull/7617#discussion_r3012835303
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java:
##########
@@ -866,4 +866,24 @@ public long getTotalReplicatedEdits() {
long getSleepForRetries() {
return sleepForRetries;
}
+
+ void restartShipper(String walGroupId, ReplicationSourceShipper oldWorker) {
+ workerThreads.compute(walGroupId, (key, current) -> {
+ if (current != oldWorker) {
+ return current; // already replaced
+ }
+
+ LOG.warn("Restarting shipper for walGroupId={}", walGroupId);
+
+ try {
+ ReplicationSourceShipper newWorker = createNewShipper(walGroupId);
+ startShipper(newWorker);
+ return newWorker;
+ } catch (Exception e) {
+ LOG.error("Failed to restart shipper for walGroupId={}", walGroupId,
e);
+ return current; // retry later
Review Comment:
can you check if this comment is right? I used the cursor AI editor also
confirmed this may be a potential bug.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]