You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/13 03:21:56 UTC

[GitHub] [flink] xintongsong commented on a diff in pull request #19938: [FLINK-27737] Remove legacy support for unfenced executor in FencedRpcEndpoint

xintongsong commented on code in PR #19938:
URL: https://github.com/apache/flink/pull/19938#discussion_r895293404


##########
flink-rpc/flink-rpc-core/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java:
##########
@@ -40,23 +35,17 @@
  */
 public abstract class FencedRpcEndpoint<F extends Serializable> extends RpcEndpoint {
 
-    private final UnfencedMainThreadExecutor unfencedMainThreadExecutor;
-    private volatile F fencingToken;
+    private final F fencingToken;
     private volatile MainThreadExecutor fencedMainThreadExecutor;

Review Comment:
   It seems we no longer need this `fencedMainThreadExecutor`, as now it is no different from `RpcEndpoint#mainThreadExecutor`.



##########
flink-rpc/flink-rpc-core/src/main/java/org/apache/flink/runtime/rpc/FencedRpcEndpoint.java:
##########
@@ -65,29 +54,14 @@ protected FencedRpcEndpoint(
                         mainThreadExecutable, this::validateRunsInMainThread, endpointId));
     }
 
-    protected FencedRpcEndpoint(RpcService rpcService, @Nullable F fencingToken) {
+    protected FencedRpcEndpoint(RpcService rpcService, @Nonnull F fencingToken) {

Review Comment:
   We don't usually use `@Nonnull`, as anything not `@Nullable` is expected non-null.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org