Conform RedisByteDecoder to NIOSingleStepByteToMessageDecoder#63
Merged
fabianfett merged 3 commits intomainfrom Jun 19, 2023
Merged
Conform RedisByteDecoder to NIOSingleStepByteToMessageDecoder#63fabianfett merged 3 commits intomainfrom
RedisByteDecoder to NIOSingleStepByteToMessageDecoder#63fabianfett merged 3 commits intomainfrom
Conversation
Member
Author
|
API breakage tool flags false positives: As stated above:
|
Member
|
@fabianfett isn't the change from |
ff608c9 to
f1dbb64
Compare
Member
Author
@Joannis Great catch! Fixed! |
Joannis
approved these changes
Jun 19, 2023
Member
Author
|
Only expected false positive changes as of now: |
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.
Cherry pick of:
https://gitlab.com/swift-server-community/RediStack/-/merge_requests/185
Motivation
Traffic on the
NIOChannelPipelineis not free, because of this recent NIO projects try to reduce the number of needed handlers for a given protocol. For example NIOSSH and NIOHTTP2 parse incoming bytes in the main ChannelHandler rather than within a dedicated DecoderHandler. To make this pattern easier theNIOSingleStepByteToMessageDecoderwas introduced into NIO. TheNIOSingleStepByteToMessageDecoderallows users to have an explicit decoder object within their main channel handler, that has the same semantics as theByteToMessageDecoderin the channel pipeline. A usage example can be seen here:https://github.com/vapor/postgres-nio/blob/main/Sources/PostgresNIO/New/PostgresChannelHandler.swift#L102
To allow us to move the
RedisByteDecoderinto theRedisChannelHandler, let's conform it toNIOSingleStepByteToMessageDecoder.Changes
Conform
RedisByteDecodertoNIOSingleStepByteToMessageDecoder. This is a non breaking change sinceNIOSingleStepByteToMessageDecoderhas default implementations for theByteToMessageDecoderprotocol, which we continue to support.