kayx23 commented on code in PR #2712:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2712#discussion_r3239398369


##########
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:
   Fixed after checking internal/adc/translator/httproute.go:455-524. The 
calculation starts at RuleIndexShiftBits = 7 and the highest occupied bit is 
38, so I updated docs/en/latest/FAQ.md to say bits 7 through 38.



##########
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:
   Fixed after checking the same calculation in 
internal/adc/translator/httproute.go:455-524. I updated docs/en/latest/FAQ.md 
to use a commit-pinned link to c48e9b3fb8d269b04b440c6fc5ed6880c05456f3 so the 
reference does not drift with master.



-- 
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]

Reply via email to