tkhurana commented on code in PR #2570:
URL: https://github.com/apache/phoenix/pull/2570#discussion_r3582682657


##########
phoenix-core-server/src/main/java/org/apache/phoenix/replication/reader/ReplicationLogDiscoveryReplay.java:
##########
@@ -571,8 +579,12 @@ public long getConsistencyPoint() throws IOException {
         Optional<Long> optionalMinTimestampInProgressTimestamp =
           getMinTimestampFromInProgressFiles();
         if (optionalMinTimestampInProgressTimestamp.isPresent()) {
-          // Use minimum timestamp from in-progress files as consistency point
-          consistencyPoint = optionalMinTimestampInProgressTimestamp.get();
+          // Align the minimum in-progress timestamp down to the start of the 
round it belongs to,
+          // so the consistency point never advances past older, 
still-unreplayed files of the same
+          // round that are waiting in the IN directory (files are picked in 
random order).
+          long minTimestampInProgress = 
optionalMinTimestampInProgressTimestamp.get();
+          consistencyPoint = 
replicationLogTracker.getReplicationShardDirectoryManager()

Review Comment:
   Simpler to use `getNearestRoundStartTimestamp` ?



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