Repository navigation
[16.1.x] [#16899] Update ConnectionMetadata protocol version on every Hot Rod request - #17329
Merged
Merged
Conversation
* Also remove some unused code
Add test verifying that ConnectionMetadata.protocolVersion updates when subsequent requests use a different protocol version on the same connection.
Files
|
Coverage for rolling-upgrade tests
Files
|
|
FLAKY TESTS
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport: #17235
Closes: #16899
ConnectionMetadata.protocolVersionwas only updated during PING processing inCacheRequestProcessor.pingResults(). Since auto-negotiating clients send the initial PING at the safe handshake version (3.1), the metadata permanently showedHOTROD/3.1even after the client upgraded to 4.1 for all subsequent requests.This PR moves the
protocolVersionupdate into thehotrod.grgrammar'sroot requestrule, so it runs after every request's header is parsed. The redundant update inCacheRequestProcessor.pingResults()is removed along with unused fields inHotRodVersion,HotRodHeader, andProtocolVersion.Author Checklist (all must be checked):
INFOand above have been internationalized.ConnectionMetadata.protocolVersion()setter is a simple field assignment.