Apache9 commented on code in PR #7191:
URL: https://github.com/apache/hbase/pull/7191#discussion_r2311967990


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationChecker.java:
##########
@@ -202,6 +202,20 @@ private boolean canPush(Entry entry, byte[] row) throws 
IOException {
     // start from 1. Here we choose the latter one.
     if (index < 0) {
       index = -index - 1;
+    } else if (index > 0 && index < barriers.length && barriers.length > 2 && 
barriers[index] == seqId) {
+      // Bug HBASE-29499
+      // Sometimes* we can end up with barriers [x, y, z], seqId = y and 
pushedSeqId = y-2

Review Comment:
   I do not fully understand the problem here.
   
   As the said in the above comment, the id range is left closed and right 
open, so if seqId = y, then its previous range is [x, y), and here we will make 
index = 2.
   
   In the below code, when checking isRangeFinished, we will pass index - 1, 
which is 1, as end barrier, which is y, and we will check whether last pushed 
sequence id is greater than or equal to y - 1.
   
   I do not understand why here you say 'the previous range of the edit is x, 
not y'...



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/SerialReplicationSourceWALReader.java:
##########
@@ -78,6 +78,7 @@ protected void readWALEntries(WALEntryStream entryStream, 
WALEntryBatch batch)
       if (doFiltering) {
         entry = filterEntry(entry);
       }
+      // TODO: why don't we skip entries with 0 edits here? 
`entry.getEdit().size() != 0`

Review Comment:
   We need the entry for recording lastPushedSequenceId.



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