Skip to content

Fix the 9.2 compatibility cache key for paths that carry ";params" - #13700

Open
traeak wants to merge 1 commit into
apache:masterfrom
traeak:92x_compat_key_semicolon
Open

traeak wants to merge 1 commit into
apache:masterfrom
traeak:92x_compat_key_semicolon

Conversation

@traeak

@traeak traeak commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Follow on to #12271 and #12283

ATS 9.2 split /path;params into separate path and params parts and built the cache key as path + ; + params. That parsing was removed, so ;params now stays in the path. The 9.2 key function still added its own ;, so /a;b=1 was hashed as /a;b=1;. 9.2 never produced that key, so lookups for these URLs could never find objects that 9.2 had cached.

This PR adds the separator only when the raw path has no literal ;. An escaped %3B still counts as no params, just as in 9.2.

The fast hash path emitted the same separator, so itg only ever produced 9.2 keys: it is renamed `url_Crypto_get_fast_92() and confined to url_CryptoHash_get_92(), leaving the canonical has on the general algorithm.

@traeak
traeak requested a lite review from Copilot September 16, 2026 15:59
@traeak traeak self-assigned this Sep 16, 2026
@traeak traeak added the Cache label Sep 16, 2026
@traeak traeak removed this from ATS v11.0.x Sep 16, 2026
@traeak traeak added this to the 11.0.0 milestone Sep 16, 2026

This comment was marked as resolved.

ATS 9.2 split "/path;params" into separate path and params components
and hashed them as path + ";" + params. That parsing was removed, so
";params" now stays inside the path, yet the 9.2 hasher still appended
a separator. A path such as "/a;b=1" hashed as "/a;b=1;", a key 9.2
never produced, so the compatibility lookup could not find objects a
9.2 cache stored for such paths. Only add the separator when the path
does not carry one, and pin the equivalence with unit tests.

The fast hash path had the same separator baked in, which made it a
9.2 implementation rather than a canonical one: enabling it through
url_hash_method would have made canonical keys collide with 9.2 keys
and tripped the debug parity assert on the first request. Rename it
to url_CryptoHash_get_fast_92 and leave it reachable only from
url_CryptoHash_get_92, so the invariant holds by construction instead
of by the option staying off.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The compatibility logic and literal versus escaped semicolon cases are covered consistently without unresolved correctness issues.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@traeak
traeak marked this pull request as ready for review September 17, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants