gjacoby126 commented on a change in pull request #701: PHOENIX-5709 Simplify
index update generation code for consistent glo…
URL: https://github.com/apache/phoenix/pull/701#discussion_r376144327
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
##########
@@ -672,15 +927,15 @@ public void
preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnviro
else {
now = EnvironmentEdgeManager.currentTimeMillis();
}
- // First group all the updates for a single row into a single update to
be processed
- Collection<? extends Mutation> mutations = groupMutations(miniBatchOp,
now, replayWrite);
+ // First merge all the updates for a single row into a single update to
be processed
+ Collection<? extends Mutation> pendingMutations = mergeMutations(c,
miniBatchOp, context, now, context.rebuild);
// early exit if it turns out we don't have any edits
- if (mutations == null) {
+ if (pendingMutations == null || pendingMutations.isEmpty()) {
return;
}
long start = EnvironmentEdgeManager.currentTimeMillis();
- prepareIndexMutations(c, miniBatchOp, context, mutations, now,
indexMetaData);
+ preparePreIndexMutations(c, miniBatchOp, context, pendingMutations, now,
indexMetaData);
Review comment:
comment specifying that this is preparing the phase 1 unverified index
writes would be helpful. Otherwise this sounds like you're preparing mutations
for before the index write, which is a bit confusing.
----------------------------------------------------------------
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