@Override
    public ServerReloadResponse handle(ServerReloadRequest request, RequestMeta meta) throws NacosException {
        ServerReloadResponse response = new ServerReloadResponse();
        Loggers.REMOTE.info("server reload request receive,reload count={},redirectServer={},requestIp={}",
                request.getReloadCount(), request.getReloadServer(), meta.getClientIp());
        int reloadCount = request.getReloadCount();
        Map<String, String> filter = new HashMap<>(2);
        filter.put(RemoteConstants.LABEL_SOURCE, RemoteConstants.LABEL_SOURCE_SDK);
        int sdkCount = connectionManager.currentClientsCount(filter);
        if (sdkCount <= reloadCount) {
            response.setMessage("ignore");
        } else {
            reloadCount = (int) Math.max(reloadCount, sdkCount * (1 - RemoteUtils.LOADER_FACTOR));
            connectionManager.loadCount(reloadCount, request.getReloadServer());
            response.setMessage("ok");
        }
        return response;
    }
@Test
    void testHandle() {
        Mockito.when(connectionManager.currentClientsCount(Mockito.any())).thenReturn(2);
        
        ServerReloadRequest reloadRequest = new ServerReloadRequest();
        reloadRequest.setReloadCount(2);
        reloadRequest.setReloadServer("test");
        RequestMeta meta = new RequestMeta();
        meta.setClientIp("1.1.1.1");
        
        try {
            ServerReloadResponse reloadResponse = handler.handle(reloadRequest, meta);
            assertEquals("ignore", reloadResponse.getMessage());
        } catch (NacosException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
        
        reloadRequest.setReloadCount(1);
        try {
            ServerReloadResponse reloadResponse = handler.handle(reloadRequest, meta);
            assertEquals("ok", reloadResponse.getMessage());
        } catch (NacosException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }