gjacoby126 commented on a change in pull request #701: PHOENIX-5709 Simplify 
index update generation code for consistent glo…
URL: https://github.com/apache/phoenix/pull/701#discussion_r377382683
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
 ##########
 @@ -409,93 +416,262 @@ private void populatePendingRows(BatchMutateContext 
context) {
       }
   }
 
-  private Collection<? extends Mutation> 
groupMutations(MiniBatchOperationInProgress<Mutation> miniBatchOp,
-                                                        long now, ReplayWrite 
replayWrite) throws IOException {
-      Map<ImmutableBytesPtr, MultiMutation> mutationsMap = new HashMap<>();
-      boolean copyMutations = false;
-      for (int i = 0; i < miniBatchOp.size(); i++) {
-          if (miniBatchOp.getOperationStatus(i) == IGNORE) {
-              continue;
+  public static void setTimestamp(Mutation m, long ts) throws IOException {
+      for (List<Cell> cells : m.getFamilyCellMap().values()) {
+          for (Cell cell : cells) {
+              CellUtil.setTimestamp(cell, ts);
 
 Review comment:
   Are we absolutely sure that in all circumstances this happens before the 
Cells are in the memstore? (In the usual case, of course this is done as part 
of preBatchMutate which is long before the Cells make it in the memstore.) I 
ask because of the Memstore crashes from "lexically out of order" Cells we 
occasionally see in secondary indexes. Modifying a Cell timestamp after it's 
been committed would be one explanation. 

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


With regards,
Apache Git Services

Reply via email to