[ 
https://issues.apache.org/jira/browse/FLINK-9981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563686#comment-16563686
 ] 

ASF GitHub Bot commented on FLINK-9981:
---------------------------------------

azagrebin commented on a change in pull request #6438: [FLINK-9981] Tune 
performance of RocksDB implementation
URL: https://github.com/apache/flink/pull/6438#discussion_r206523056
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimerServiceImpl.java
 ##########
 @@ -227,37 +227,31 @@ public void onProcessingTime(long time) throws Exception 
{
                // inside the callback.
                nextTimer = null;
 
-               processingTimeTimersQueue.bulkPoll(
-                       (timer) -> (timer.getTimestamp() <= time),
-                       (timer) -> {
-                               keyContext.setCurrentKey(timer.getKey());
-                               try {
-                                       triggerTarget.onProcessingTime(timer);
-                               } catch (Exception e) {
-                                       throw new 
FlinkRuntimeException("Problem in trigger target.", e);
-                               }
-                       });
+               InternalTimer<K, N> timer;
+
+               while ((timer = processingTimeTimersQueue.peek()) != null && 
timer.getTimestamp() <= time) {
+                       processingTimeTimersQueue.poll();
+                       keyContext.setCurrentKey(timer.getKey());
+                       triggerTarget.onProcessingTime(timer);
+               }
 
-               if (nextTimer == null) {
-                       final TimerHeapInternalTimer<K, N> timer = 
processingTimeTimersQueue.peek();
-                       if (timer != null) {
+               if (timer != null) {
+                       if (nextTimer == null) {
 
 Review comment:
   if (timer != null && nextTimer == null) {

----------------------------------------------------------------
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:
us...@infra.apache.org


> Tune performance of RocksDB implementation
> ------------------------------------------
>
>                 Key: FLINK-9981
>                 URL: https://issues.apache.org/jira/browse/FLINK-9981
>             Project: Flink
>          Issue Type: Sub-task
>          Components: State Backends, Checkpointing
>    Affects Versions: 1.6.0
>            Reporter: Stefan Richter
>            Assignee: Stefan Richter
>            Priority: Major
>              Labels: pull-request-available
>
> General performance tuning/polishing for the RocksDB implementation. We can 
> figure out how caching/seeking can be improved.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to