[jira] [Created] (FLINK-6179) Create SerialMainThreadValidatorUtil to support TestingSerialRpcService

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-6179) Create SerialMainThreadValidatorUtil to support TestingSerialRpcService

Shang Yuanchun (Jira)
Till Rohrmann created FLINK-6179:
------------------------------------

             Summary: Create SerialMainThreadValidatorUtil to support TestingSerialRpcService
                 Key: FLINK-6179
                 URL: https://issues.apache.org/jira/browse/FLINK-6179
             Project: Flink
          Issue Type: Sub-task
          Components: Distributed Coordination
    Affects Versions: 1.3.0
            Reporter: Till Rohrmann
            Assignee: Till Rohrmann
            Priority: Minor


The {{MainThreadValidatorUtil}} does not play well together with the {{TestingSerialRpcService}} which executes all rpc call in the same thread. In order to still support main thread validation in the {{RpcEndpoint}} methods, I porpose to implement a {{SerialMainThreadValidatorUtil}} which not only sets the main thread if the current thread is {{null}}, but also if current thread is the entering thread. In order to make this properly work with releasing the main thread field, we have to count how often we have entered the main thread and only set the field to {{null}} iff the count equals 0.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)