You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/05/13 09:26:48 UTC

[GitHub] [hbase] comnetwork commented on a diff in pull request #4392: HBASE-26993 Make the new framework for region replication could work …

comnetwork commented on code in PR #4392:
URL: https://github.com/apache/hbase/pull/4392#discussion_r872183114


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -3606,24 +3610,25 @@ protected MiniBatchOperationInProgress<Mutation> createMiniBatch(final int lastI
         @Override
         public boolean visit(int index) throws IOException {
           Mutation m = getMutation(index);
+          // the batch may contain multiple nonce keys (replay case). If so, write WALEdit for each.
+          // Given how nonce keys are originally written, these should be contiguous.
+          // They don't have to be, it will still work, just write more WALEdits than needed.
+          long nonceGroup = getNonceGroup(index);
+          long nonce = getNonce(index);
           // we use durability of the original mutation for the mutation passed by CP.
           if (region.getEffectiveDurability(m.getDurability()) == Durability.SKIP_WAL) {
             region.recordMutationWithoutWal(m.getFamilyCellMap());
+            miniBatchOp.addSkipWALMutation(new NonceKey(nonceGroup, nonce), familyCellMaps[index]);

Review Comment:
   @Apache9 , yes, thank you very much for reminding, I have fixed.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org