You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/11/11 17:18:25 UTC

[GitHub] [phoenix] gokceni commented on a change in pull request #625: PHOENIX-5565 Unify index update structures in IndexRegionObserver and…

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

 ##########
 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 think removeAll will return an empty list rather than null. Let's add a size check here as well

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services