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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]