diff --git a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcRequestAcceptor.java b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcRequestAcceptor.java index a2869d6cd..9318408f6 100644 --- a/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcRequestAcceptor.java +++ b/core/src/main/java/com/alibaba/nacos/core/remote/grpc/GrpcRequestAcceptor.java @@ -16,6 +16,7 @@ package com.alibaba.nacos.core.remote.grpc; +import com.alibaba.nacos.api.ability.constant.AbilityKey; import com.alibaba.nacos.api.ability.register.impl.ServerAbilities; import com.alibaba.nacos.api.exception.NacosException; import com.alibaba.nacos.api.grpc.auto.Payload; @@ -26,6 +27,8 @@ import com.alibaba.nacos.api.remote.request.ServerCheckRequest; import com.alibaba.nacos.api.remote.response.ErrorResponse; import com.alibaba.nacos.api.remote.response.Response; import com.alibaba.nacos.api.remote.response.ServerCheckResponse; +import com.alibaba.nacos.api.utils.AbilityTableUtils; +import com.alibaba.nacos.common.ability.discover.NacosAbilityManagerHolder; import com.alibaba.nacos.common.remote.client.grpc.GrpcUtils; import com.alibaba.nacos.core.remote.Connection; import com.alibaba.nacos.core.remote.ConnectionManager; @@ -90,7 +93,8 @@ public class GrpcRequestAcceptor extends RequestGrpc.RequestImplBase { // server check. if (ServerCheckRequest.class.getSimpleName().equals(type)) { Payload serverCheckResponseP = GrpcUtils.convert(new ServerCheckResponse(CONTEXT_KEY_CONN_ID.get(), - ServerAbilities.getBitFlags())); + AbilityTableUtils.getAbilityBiTableBy(AbilityKey.offset(), + NacosAbilityManagerHolder.getInstance().getCurrentRunningAbility()))); traceIfNecessary(serverCheckResponseP, false); responseObserver.onNext(serverCheckResponseP); responseObserver.onCompleted();