virajjasani commented on code in PR #2030: URL: https://github.com/apache/phoenix/pull/2030#discussion_r1861680120
########## phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java: ########## @@ -1167,19 +1173,29 @@ private static void identifyIndexMaintainerTypes(PhoenixIndexMetaData indexMetaD } private void identifyMutationTypes(MiniBatchOperationInProgress<Mutation> miniBatchOp, - BatchMutateContext context) { + BatchMutateContext context) throws IOException { for (int i = 0; i < miniBatchOp.size(); i++) { Mutation m = miniBatchOp.getOperation(i); if (this.builder.returnResult(m) && miniBatchOp.size() == 1) { context.returnResult = true; } if (this.builder.isAtomicOp(m) || this.builder.returnResult(m)) { context.hasAtomic = true; - if (context.hasDelete) { + if (context.hasRowDelete) { return; } } else if (m instanceof Delete) { - context.hasDelete = true; + CellScanner scanner = m.cellScanner(); + if (m.isEmpty()) { + context.hasRowDelete = true; + } else { + while (scanner.advance()) { + if (scanner.current().getType() == Cell.Type.DeleteFamily) { + context.hasRowDelete = true; Review Comment: In what case, hasRowDelete can be false? ########## 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: For CDC, in what cases we will have non-raw scan? -- 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: issues-unsubscr...@phoenix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org