GitHub user NicoK opened a pull request:

    https://github.com/apache/flink/pull/5570

    [FLINK-8768][network] Let NettyMessageDecoder inherit from 
LengthFieldBasedFrameDecoder

    ## What is the purpose of the change
    
    Instead of being two steps in the channel pipeline, `NettyMessageDecoder` 
could derive from `LengthFieldBasedFrameDecoder` to reduce overhead and give us 
more control over the protocol.
    
    As a first step, we will use this to override the `#extractFrame()` method 
to restore the old Netty 4.0.27 behaviour for non-credit based code paths which 
had a bug with Netty >= 4.0.28 (see FLINK-8759).
    
    ## Brief change log
    
    - make `NettyMessageDecoder` inherit from `LengthFieldBasedFrameDecoder` 
(beware that this changes the decoder from a `MessageToMessageDecoder` to a 
`ByteToMessageDecoder` with different cleanup invariants!)
    
    ## Verifying this change
    
    This change is already covered by existing tests, such as 
`NettyMessageSerializationTest` or other network tests using the 
encoding/decoding pipeline.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): **no**
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **no**
      - The serializers: **no**
      - The runtime per-record code paths (performance sensitive): **no** (only 
per buffer)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
      - The S3 file system connector: **no**
    
    ## Documentation
    
      - Does this pull request introduce a new feature? **no**
      - If yes, how is the feature documented? (JavaDocs)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NicoK/flink flink-8768

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5570.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5570
    
----
commit 272899e01c2836a2a5b47958db7d9d9f6cbf471d
Author: Nico Kruber <nico@...>
Date:   2018-02-23T12:56:29Z

    [FLINK-8768][network] Let NettyMessageDecoder inherit from 
LengthFieldBasedFrameDecoder
    
    This replaces one additional step from the pipeline and does not only remove
    overhead there but also allows use to override the #extractFrame() method to
    restore the old Netty 4.0.27 behaviour for non-credit based code paths which
    had a bug with Netty >= 4.0.28 there (see FLINK-8759).

----


---

Reply via email to