Skip to content

[16.1.x] [#16899] Update ConnectionMetadata protocol version on every Hot Rod request - #17329

Merged
tristantarrant merged 2 commits into
16.1.xfrom
bp-16.1.x-9e3bf1d-c42cd5c
Apr 28, 2026
Merged

tristantarrant merged 2 commits into
16.1.xfrom
bp-16.1.x-9e3bf1d-c42cd5c

Conversation

@infinispanrelease

Copy link
Copy Markdown

Backport: #17235

Closes: #16899

ConnectionMetadata.protocolVersion was only updated during PING processing in CacheRequestProcessor.pingResults(). Since auto-negotiating clients send the initial PING at the safe handshake version (3.1), the metadata permanently showed HOTROD/3.1 even after the client upgraded to 4.1 for all subsequent requests.

This PR moves the protocolVersion update into the hotrod.gr grammar's root request rule, so it runs after every request's header is parsed. The redundant update in CacheRequestProcessor.pingResults() is removed along with unused fields in HotRodVersion, HotRodHeader, and ProtocolVersion.

Author Checklist (all must be checked):

  • Commit message includes a reference to the corresponding GitHub issue (e.g. commit message: "[#00000] Issue title...") and is formatted according to our git message template.
  • Commits have been squashed into self-contained units of work (e.g. 'WIP'- and 'Implements feedback'-style messages have been removed).
  • The PR includes new/modified unit and integration tests that exercise the changes. Include additional manual testing instructions if necessary. If the PR does not include tests, clear justification MUST be provided.
  • The PR includes new/modified documentation. If the PR does not require documentation changes, clear justification MUST be provided.
    • No documentation changes needed: internal behavior fix with no user-facing API change.
  • Log messages of level INFO and above have been internationalized.
  • If the PR affects performance, include before/after benchmarks.
    • No performance impact: the ConnectionMetadata.protocolVersion() setter is a simple field assignment.
  • If the PR affects output (such as logs, CLI, Console), provide an example (text snippet/screenshot).
  • If the PR requires a followup or is part of a larger body of work, ensure that relevant GitHub issues have been created to track the additional work.

Add test verifying that ConnectionMetadata.protocolVersion updates
when subsequent requests use a different protocol version on the
same connection.
@github-actions

Copy link
Copy Markdown
Overall Project 77.28% 🍏
Module Coverage
infinispan-server-hotrod 84.49% 🍏
infinispan-client-hotrod 72.13% 🍏
Files
Module File Coverage
infinispan-server-hotrod HotRodVersion.java 100% 🍏
CacheRequestProcessor.java 87.79% 🍏
HotRodHeader.java 78.47% 🍏
infinispan-client-hotrod ProtocolVersion.java 90% 🍏

@github-actions

Copy link
Copy Markdown

Coverage for rolling-upgrade tests

Overall Project 37.75% 🍏
Module Coverage
infinispan-server-hotrod 50.17% 🍏
infinispan-client-hotrod 0% 🍏
Files
Module File Coverage
infinispan-server-hotrod HotRodVersion.java 99.11% 🍏
CacheRequestProcessor.java 61.34% 🍏
HotRodHeader.java 56.94% 🍏
infinispan-client-hotrod ProtocolVersion.java 0% 🍏

@github-actions

Copy link
Copy Markdown

FLAKY TESTS

  • org.infinispan.server.resp.dist.TransactionClusteredTest#testTransactionWithWatcher[mode=DIST_SYNC, fromOwner=false]

@tristantarrant
tristantarrant merged commit e060925 into 16.1.x Apr 28, 2026
12 of 13 checks passed
@tristantarrant
tristantarrant deleted the bp-16.1.x-9e3bf1d-c42cd5c branch April 29, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants