priyankporwal commented on a change in pull request #469: PHOENIX-5156 
Consistent Global Indexes for Non-Transactional Tables
URL: https://github.com/apache/phoenix/pull/469#discussion_r285278826
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java
 ##########
 @@ -1418,6 +1420,14 @@ public static void 
syncTableAndIndexProperties(PhoenixConnection conn, Admin adm
                 continue;
             }
             if (table.getType() == PTableType.INDEX) {
+                if (table.getIndexType() == IndexType.GLOBAL &&
+                        !table.isTransactional() &&
+                        !table.isImmutableRows() &&
+                        
!origTableDesc.hasCoprocessor(GlobalIndexChecker.class.getName())) {
+                    TableDescriptorBuilder builder = 
TableDescriptorBuilder.newBuilder(origTableDesc);
+                    builder.addCoprocessor(GlobalIndexChecker.class.getName(), 
null, QueryServicesOptions.DEFAULT_COPROCESSOR_PRIORITY - 1, null);
 
 Review comment:
   Need to remove the old Indexer co-processor as well.
   
   Also, as I have noted in the upgrade steps I believe this change should not 
be in the 4.14.2 release and putting it in another PR would make it easier.

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