virajjasani commented on code in PR #2658:
URL: https://github.com/apache/phoenix/pull/2658#discussion_r4507764742


##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexCDCConsumer.java:
##########
@@ -1263,24 +1308,44 @@ private void 
generateAndApplyIndexMutations(PhoenixConnection conn,
     refreshDataTableCache(conn);
     PTable dataTable = getDataTable(conn);
     byte[] encodedRegionNameBytes = 
env.getRegion().getRegionInfo().getEncodedNameAsBytes();
-    List<Pair<IndexMaintainer, HTableInterfaceReference>> indexTables = new 
ArrayList<>();
+    List<Pair<Pair<IndexMaintainer, HTableInterfaceReference>, Long>> targets 
= new ArrayList<>();
     for (PTable index : dataTable.getIndexes()) {
-      IndexConsistency consistency = index.getIndexConsistency();
-      if (consistency != null && consistency.isAsynchronous()) {
+      long cutoff = getApplyCutoff(dataTable, index);
+      if (cutoff != Long.MIN_VALUE) {
         IndexMaintainer maintainer = index.getIndexMaintainer(dataTable, conn);
         HTableInterfaceReference tableRef =
           new HTableInterfaceReference(new 
ImmutableBytesPtr(maintainer.getIndexTableName()));
-        indexTables.add(new Pair<>(maintainer, tableRef));
+        targets.add(new Pair<>(new Pair<>(maintainer, tableRef), cutoff));
       }
     }

Review Comment:
   This is for follow-up for sure, but we don't need new SYSCAT column. We can 
make use of IndexConsistency value that we use in SYSCAT already as per above 
comment. We can discuss this later on follow-up Jira/PR anyway.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to