public void addRmtAddrErrCount(String remoteAddr) {
        RemoteConErrStats rmtConErrStats = remoteAddrMap.get(remoteAddr);
        if (rmtConErrStats == null) {
            RemoteConErrStats newErrStatistic =
                    new RemoteConErrStats(linkStatsDurationMs, linkStatsMaxAllowedFailCount);
            rmtConErrStats = remoteAddrMap.putIfAbsent(remoteAddr, newErrStatistic);
            if (rmtConErrStats == null) {
                rmtConErrStats = newErrStatistic;
            }
        }
        if (rmtConErrStats.increErrCount()) {
            boolean isAdded = false;
            Long beforeTime = forbiddenAddrMap.get(remoteAddr);
            if (beforeTime == null) {
                int totalCount = 0;
                Long curTime = System.currentTimeMillis();
                Set<String> expiredAddrs = new HashSet<>();
                for (Map.Entry<String, Long> entry : forbiddenAddrMap.entrySet()) {
                    if (entry.getKey() == null || entry.getValue() == null) {
                        continue;
                    }
                    if ((curTime - entry.getValue()) > linkStatsForbiddenDurMs) {
                        expiredAddrs.add(entry.getKey());
                        continue;
                    }
                    totalCount++;
                }
                if (!expiredAddrs.isEmpty()) {
                    for (String tmpAddr : expiredAddrs) {
                        Long sotreTime = forbiddenAddrMap.get(tmpAddr);
                        if (sotreTime == null) {
                            continue;
                        }
                        if ((curTime - sotreTime) > linkStatsForbiddenDurMs) {
                            forbiddenAddrMap.remove(tmpAddr);
                        }
                    }
                }
                int needForbiddenCount =
                        (int) Math.rint(remoteAddrMap.size() * linkStatsMaxAllowedForbiddenRate);
                needForbiddenCount = Math.min(needForbiddenCount, 30);
                if (needForbiddenCount > totalCount) {
                    forbiddenAddrMap.put(remoteAddr, System.currentTimeMillis());
                    isAdded = true;
                }
            } else {
                forbiddenAddrMap.put(remoteAddr, System.currentTimeMillis());
                isAdded = true;
            }
            long curLastPrintTime = lastLogPrintTime.get();
            if ((isAdded)
                    && (System.currentTimeMillis() - curLastPrintTime > 120000)) {
                if (lastLogPrintTime.compareAndSet(curLastPrintTime, System.currentTimeMillis())) {
                    logger.info(new StringBuilder(512)
                            .append("[Remote Address] forbidden list : ")
                            .append(forbiddenAddrMap.toString()).toString());
                }
            }
        }
    }
Accumulate a error count for the remote address

@param remoteAddr    the remote address
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corerpc/RpcServiceFactory.java