Apache9 commented on code in PR #7617:
URL: https://github.com/apache/hbase/pull/7617#discussion_r2844329304
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java:
##########
@@ -154,15 +196,16 @@ protected void postFinish() {
private void shipEdits(WALEntryBatch entryBatch) {
List<Entry> entries = entryBatch.getWalEntries();
int sleepMultiplier = 0;
- if (entries.isEmpty()) {
- updateLogPosition(entryBatch);
- return;
- }
int currentSize = (int) entryBatch.getHeapSize();
source.getSourceMetrics()
.setTimeStampNextToReplicate(entries.get(entries.size() -
1).getKey().getWriteTime());
while (isActive()) {
try {
+ if (entries.isEmpty()) {
Review Comment:
I'm not sure if the current logic in ReplicationSource can handle shipper
abort, but I think this is a possible way to deal with the problem.
When restarting, we read from the external replication offset storage and
restart from the offset.
I think this could also be used to deal with the updateLogPosition
exception, so we do not need to abort the whole region server.
--
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]