gjacoby126 commented on a change in pull request #631: PHOENIX-5494 Batched,
mutable Index updates are unnecessarily run one…
URL: https://github.com/apache/phoenix/pull/631#discussion_r345998672
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
##########
@@ -638,7 +638,13 @@ public void
preBatchMutateWithExceptions(ObserverContext<RegionCoprocessorEnviro
}
long start = EnvironmentEdgeManager.currentTimeMillis();
+ if (replayWrite == null) {
+ this.builder.scanCurrentRowStates(context.rowsToLock, indexMetaData,
now);
+ }
prepareIndexMutations(c, miniBatchOp, context, mutations, now,
indexMetaData);
+ if (replayWrite == null) {
+ this.builder.removeRowStates(context.rowsToLock);
Review comment:
If prepareIndexMutations throws an exception so that
this.builder.removeRowStates never gets called, are we still ok, or does this
need a finally block? Seems like the LocalTable cache of results would just
fill and fill until we OOM.
Alternately, the results cache could have an upper limit beyond which it
auto-removes older items, but that's probably more complex.
----------------------------------------------------------------
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