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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to