Copilot commented on code in PR #2712: URL: https://github.com/apache/apisix-ingress-controller/pull/2712#discussion_r3239292426
########## docs/en/latest/FAQ.md: ########## @@ -35,8 +35,8 @@ This document provides answers to frequently asked questions (FAQ) when using AP In APISIX, a higher value indicates a higher route priority. * **Ingress:** Does not support explicit route priority. Routes created using Ingress are assigned a default priority of 0, typically the lowest. -* **HTTPRoute:** Has a [38-bit priority](https://github.com/apache/apisix-ingress-controller/blob/master/internal/adc/translator/httproute.go#L428-L448). The priority calculation is dynamic and may change, making exact values difficult to predict. -* **APISIXRoute:** Can be assigned an explicit priority. To have a higher priority than an HTTPRoute, the value must exceed 549,755,813,887 (2^39 − 1). +* **HTTPRoute:** Uses priority bits 0 through 38 based on hostname length, match fields, and rule index. The [priority calculation](https://github.com/apache/apisix-ingress-controller/blob/master/internal/adc/translator/httproute.go#L455-L524) is dynamic and may change, making exact values difficult to predict. Review Comment: The text says HTTPRoute uses priority bits 0 through 38, but the implementation only sets fields starting at bit 7 (RuleIndexShiftBits=7) up to bit 38 (PreciseHostnameShiftBits=31 with an 8-bit length). Consider rewording to “uses bits 7–38 (up to bit 38)” to match the actual calculation. ########## docs/en/latest/FAQ.md: ########## @@ -35,8 +35,8 @@ This document provides answers to frequently asked questions (FAQ) when using AP In APISIX, a higher value indicates a higher route priority. * **Ingress:** Does not support explicit route priority. Routes created using Ingress are assigned a default priority of 0, typically the lowest. -* **HTTPRoute:** Has a [38-bit priority](https://github.com/apache/apisix-ingress-controller/blob/master/internal/adc/translator/httproute.go#L428-L448). The priority calculation is dynamic and may change, making exact values difficult to predict. -* **APISIXRoute:** Can be assigned an explicit priority. To have a higher priority than an HTTPRoute, the value must exceed 549,755,813,887 (2^39 − 1). +* **HTTPRoute:** Uses priority bits 0 through 38 based on hostname length, match fields, and rule index. The [priority calculation](https://github.com/apache/apisix-ingress-controller/blob/master/internal/adc/translator/httproute.go#L455-L524) is dynamic and may change, making exact values difficult to predict. Review Comment: The GitHub link is still branch-based (blob/master), so it can drift over time and isn’t a true permalink. If the intention is a stable reference, consider linking to a specific commit SHA (or tag) for the priority calculation. -- 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]
