kadirozde commented on a change in pull request #625: PHOENIX-5565 Unify index 
update structures in IndexRegionObserver and…
URL: https://github.com/apache/phoenix/pull/625#discussion_r344859840
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
 ##########
 @@ -512,86 +515,84 @@ public static void removeEmptyColumn(Mutation m, byte[] 
emptyCF, byte[] emptyCQ)
       }
   }
 
+  private void 
handleLocalIndexUpdates(ObserverContext<RegionCoprocessorEnvironment> c,
+                                       MiniBatchOperationInProgress<Mutation> 
miniBatchOp,
+                                       ListMultimap<HTableInterfaceReference, 
Pair<Mutation, byte[]>> indexUpdates) {
+      byte[] tableName = 
c.getEnvironment().getRegion().getTableDescriptor().getTableName().getName();
+      HTableInterfaceReference hTableInterfaceReference =
+                          new HTableInterfaceReference(new 
ImmutableBytesPtr(tableName));
+      List<Pair<Mutation, byte[]>> localIndexUpdates = 
indexUpdates.removeAll(hTableInterfaceReference);
+      if (localIndexUpdates == null) {
 
 Review comment:
   I misunderstood your comment. I thought you implied that we cannot use 
removeAll here. I will add the size check although it is not needed for 
correctness as the rest of the code will not do anything if the list is empty.

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