sunjincheng121 commented on a change in pull request #6918: 
[FLINK-10543][table] Leverage efficient timer deletion in relational operators
URL: https://github.com/apache/flink/pull/6918#discussion_r238885825
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/NonWindowJoin.scala
 ##########
 @@ -261,10 +196,7 @@ abstract class NonWindowJoin(
 
     cntAndExpiredTime.f1 = getNewExpiredTime(curProcessTime, 
cntAndExpiredTime.f1)
     // update timer if necessary
-    if (stateCleaningEnabled && timerState.value() == 0) {
-      timerState.update(cntAndExpiredTime.f1)
-      ctx.timerService().registerProcessingTimeTimer(cntAndExpiredTime.f1)
-    }
+    registerProcessingCleanupTimer(ctx, curProcessTime)
 
 Review comment:
   After remove both`ProcessFunctionWithCleanupState` and 
`CoProcessFunctionWithCleanupState`,  and remove the param of 
`CleanupState#registerProcessingCleanupTimer`, we can call 
`registerProcessingCleanupTimer` as follows:
   ```
   if(stateCleaningEnabled){
         registerProcessingCleanupTimer(
           cleanupTimeState,
           currentTime,
           minRetentionTime,
           maxRetentionTime,
           ctx.timerService()
         )
       }
   ```
   What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to