kadirozde commented on code in PR #2030:
URL: https://github.com/apache/phoenix/pull/2030#discussion_r1861723579


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/UncoveredIndexRegionScanner.java:
##########
@@ -303,8 +303,9 @@ private boolean verifyIndexRowAndRepairIfNecessary(Result 
dataRow, byte[] indexR
         if (indexMaintainer.isCDCIndex()) {
             // A CDC index row key is PARTITION_ID() + PHOENIX_ROW_TIMESTAMP() 
+ data row key. The
             // only necessary check is the row timestamp check since the data 
row key is extracted
-            // from the index row key and PARTITION_ID() changes during region 
splits and merges
-            if (IndexUtil.getMaxTimestamp(put) == indexTimestamp) {
+            // from the index row key and PARTITION_ID() changes during region 
splits and merges.
+            // If the scan is a raw scan, even the time check is not necessary 
for the CDC indexes
+            if (scan.isRaw() || IndexUtil.getMaxTimestamp(put) == 
indexTimestamp) {

Review Comment:
   I cannot think of any. Phoenix allows executing queries on index tables 
directly although in practice one should not need to do that. Even if Phoenix 
users do not do that, test code or internal tools may do that. I will update 
the comment to state that it is expected that all CDC index scans will be raw.



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