tkhurana commented on code in PR #2008:
URL: https://github.com/apache/phoenix/pull/2008#discussion_r1840940349
##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionScanner.java:
##########
@@ -708,6 +747,28 @@ private void
annotateAndCommit(UngroupedAggregateRegionObserver.MutationList mut
mutations.clear();
}
+ /**
+ * Similar to {@link
#annotateAndCommit(UngroupedAggregateRegionObserver.MutationList)} but
+ * only meant for single row atomic delete mutation that requires
returning the result if
+ * the row is deleted atomically.
+ *
+ * @param mutations Mutation list.
+ * @return Result to be returned.
+ * @throws IOException If something goes wrong with the operation.
+ */
+ private Result annotateCommitAndReturnResult(
+ UngroupedAggregateRegionObserver.MutationList mutations) throws
IOException {
+ annotateDataMutations(mutations, scan);
+ if (isDelete || isUpsert) {
+ annotateDataMutationsWithExternalSchemaId(mutations, scan);
+ }
+ Result result =
ungroupedAggregateRegionObserver.commitWithResultReturned(mutations,
+ indexUUID, indexMaintainersPtr, txState, targetHTable,
+ useIndexProto, clientVersionBytes);
+ mutations.clear();
+ return result;
+ }
+
Review Comment:
I didn't like how the code has been duplicated with the regular path just to
handle the specialized single row delete case.
--
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]