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


##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -910,7 +911,12 @@ private void 
applyPendingPutMutations(MiniBatchOperationInProgress<Mutation> min
                 context.dataRowStates.put(rowKeyPtr, dataRowState);
             }
             Put nextDataRowState = dataRowState.getSecond();
-            dataRowState.setSecond((nextDataRowState != null) ? applyNew((Put) 
m, nextDataRowState) : new Put((Put) m));
+            // Need to deep copy the references to the cells in the mutation
+            Put copied = IndexUtil.copyPut((Put) m);

Review Comment:
   Which places are you talking about ? I think we need to do this only at 
places where we are setting values in BatchMutateContext for the first time. 
That can happen when we are reading from disk in `readDataTableRows` where we 
get the cells from `RegionScanner.next()` or when reading from the Mutation in 
the miniBatchOp.  Once we have our copies, regular copy is fine.



-- 
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-unsubscr...@phoenix.apache.org

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

Reply via email to