vinayakphegde commented on code in PR #7591:
URL: https://github.com/apache/hbase/pull/7591#discussion_r2665107860


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceShipper.java:
##########
@@ -246,11 +243,33 @@ void shipEdits(WALEntryBatch entryBatch) {
     }
   }
 
-  private ReplicationResult getReplicationResult() {
-    EmptyEntriesPolicy policy = 
source.getReplicationEndpoint().getEmptyEntriesPolicy();
-    return (policy == EmptyEntriesPolicy.COMMIT)
-      ? ReplicationResult.COMMITTED
-      : ReplicationResult.SUBMITTED;
+  private boolean shouldFlushStagedWal() {
+    return (stagedWalSize >= 
source.getReplicationEndpoint().getMaxBufferSize())
+      || (EnvironmentEdgeManager.currentTime() - lastStagedFlushTs
+          >= source.getReplicationEndpoint().maxFlushInterval());
+  }
+
+  private void flushStagedWal() {
+    source.getReplicationEndpoint().beforePersistingReplicationOffset();

Review Comment:
   What if persisting the WAL entries fails at the endpoint? In that case, we 
should throw an exception and fail here as well, since we cannot move forward 
until the entries are successfully persisted at the endpoint.



-- 
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]

Reply via email to