flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] 1u0 opened a new pull request #8523: [FLINK-12481][runtime] Invoke timer callback in task thread (via mailbox)
Date Thu, 23 May 2019 13:12:21 GMT
1u0 opened a new pull request #8523: [FLINK-12481][runtime] Invoke timer callback in task thread
(via mailbox)
URL: https://github.com/apache/flink/pull/8523
 
 
   ## What is the purpose of the change
   
   This PR moves invocation of timer callback (`ProcessingTimeCallback`) from `SystemProcessingTimeService`
execution thread pool into `StreamTask`'s main thread (passing callback via mailbox introduced
in [[FLINK-12480]](https://issues.apache.org/jira/browse/FLINK-12480)).
   
   This is a sub-task of general effort of moving away from using concurrent access to `StreamTask`'s
state.
   
   ## Brief change log
   
     - The `checkpointLock` and `AsyncExceptionHandler` are moved out of `SystemProcessingTimeService`
as abstract invocation context (`ScheduledCallbackExecutionContext`). So the service is abstracted
and is not concerned about `StreamTask`'s use case.
     - The implementation of `ScheduledCallbackExecutionContext` for `StreamTask` uses mailbox
(instead of locking on `checkpointLock`) to delegate timer callback invocation in main task's
thread.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - A test in `StreamTaskTest` has been modified to verify new runtime invariant;
   
   Note: `StreamTaskTimerTest` fails (regression) due to blocking in `inputProcessor.processInput()`.
In both tests the task thread get interrupted, without peeking any mailbox messages (timer
callbacks in those tests are already in mailbox queue).
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes
/ **no**)
     - The serializers: (yes / no / **don't know**)
     - The runtime per-record code paths (performance sensitive): (yes / no / **don't know**)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing,
Yarn/Mesos, ZooKeeper: (**yes** / no / don't know)
     - The S3 file system connector: (yes / no / **don't know**)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not
documented)
   

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


With regards,
Apache Git Services

Mime
View raw message