wchevreuil commented on code in PR #7617:
URL: https://github.com/apache/hbase/pull/7617#discussion_r2736079118
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java:
##########
@@ -229,6 +247,41 @@ private void shipEdits(WALEntryBatch entryBatch) {
}
}
+ private boolean shouldPersistLogPosition() {
+ ReplicationEndpoint endpoint = source.getReplicationEndpoint();
+ long maxBufferSize = endpoint.getMaxBufferSize();
+ if (stagedWalSize == 0 || lastShippedBatch == null) {
+ return false;
+ }
+ if (maxBufferSize == -1) {
+ return true;
+ }
+ return stagedWalSize >= maxBufferSize
+ || (EnvironmentEdgeManager.currentTime() - lastStagedFlushTs >=
endpoint.maxFlushInterval());
+ }
+
+ private void persistLogPosition() throws IOException {
+ if (lastShippedBatch == null) {
+ return;
+ }
+
+ ReplicationEndpoint endpoint = source.getReplicationEndpoint();
+ endpoint.beforePersistingReplicationOffset();
+
+ // Clean up hfile references
+ for (Entry entry : entriesForCleanUpHFileRefs) {
+ cleanUpHFileRefs(entry.getEdit());
+ LOG.trace("shipped entry {}: ", entry);
Review Comment:
Please provide a more accurate message. This is not what really happened
here.
--
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]