Apache9 commented on code in PR #7617:
URL: https://github.com/apache/hbase/pull/7617#discussion_r2724276907
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java:
##########
@@ -190,13 +204,16 @@ private void shipEdits(WALEntryBatch entryBatch) {
} else {
sleepMultiplier = Math.max(sleepMultiplier - 1, 0);
}
- // Clean up hfile references
- for (Entry entry : entries) {
- cleanUpHFileRefs(entry.getEdit());
- LOG.trace("shipped entry {}: ", entry);
+
+ stagedWalSize += currentSize;
+ entriesForCleanUpHFileRefs.addAll(entries);
+ lastShippedBatch = entryBatch;
+ if (shouldPersistLogPosition()) {
Review Comment:
I think time based and size based persistency is enough for most cases? If
in the future we have some special endpoint which needs new type of decision
way, we can add new mechanism, no problem.
The problem here why we do not want to only trigger persistency from
endpoint is that, we have other considerations about when to persist the log
position, like the trade off between failover and pressure on replication
storage. So here I suggest that we introduce general mechanisms to control the
behavior of persistency of log position, users can tune it based on different
approach.
--
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]