sanjeet006py commented on code in PR #2574:
URL: https://github.com/apache/phoenix/pull/2574#discussion_r3786533624


##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -794,18 +808,16 @@ private void 
addOnDupMutationsToBatch(MiniBatchOperationInProgress<Mutation> min
    */
   private void 
updateMutationsForConditionalTTL(MiniBatchOperationInProgress<Mutation> 
miniBatchOp,
     BatchMutateContext context) throws IOException {
-    // If TTL is not strict, skip conditional TTL processing
-    if (!context.isStrictTTLForInternalScan) {
+    if (!context.isConditionalTTL()) {

Review Comment:
   The invocation of method `updateMutationsForConditionalTTL` is gated by 
pre-existing `hasConditionalTTL` in `preBatchMutateWithExceptions`. 
`hasConditionalTTL` is true when mutation batch has conditionalTTL along with 
strict TTL being true. Given conditional TTL and strict TTL are two independent 
properties then gating by the caller of the method makes sense so, I removed 
the check from method itself. 
   
   But separately added a check for conditionalTTL explicitly as this method 
should never be called when its not conditional TTL. Its more of defense in 
depth check as whole method is relevant for conditional TTL only.
   
   So, I am not mixing two concepts. 



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