diff --git a/config/src/main/java/com/alibaba/nacos/config/server/filter/TransferToLeaderFilter.java b/config/src/main/java/com/alibaba/nacos/config/server/filter/TransferToLeaderFilter.java index ce944634d..98d34704b 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/filter/TransferToLeaderFilter.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/filter/TransferToLeaderFilter.java @@ -135,7 +135,9 @@ public class TransferToLeaderFilter implements Filter { String val = req.getHeader(Constants.FORWARD_LEADER); final int transferCnt = Integer.parseInt(StringUtils.isEmpty(val) ? "0" : val) + 1; - if (transferCnt > MAX_TRANSFER_CNT) { + + // Requests can only be forwarded once if a downgrade is not triggered + if (transferCnt > MAX_TRANSFER_CNT && !downgrading) { resp.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, "Exceeded forwarding times:" + req.getMethod() + ":" + req.getRequestURI()); return; diff --git a/consistency/src/main/java/com/alibaba/nacos/consistency/ConsistencyProtocol.java b/consistency/src/main/java/com/alibaba/nacos/consistency/ConsistencyProtocol.java index e18bdf697..a199c9637 100644 --- a/consistency/src/main/java/com/alibaba/nacos/consistency/ConsistencyProtocol.java +++ b/consistency/src/main/java/com/alibaba/nacos/consistency/ConsistencyProtocol.java @@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture; /** * Has nothing to do with the specific implementation of the consistency protocol - * Initialization sequence: init(Config) => loadLogProcessor(List) + * Initialization sequence: init(Config) * *