GitHub user uce opened a pull request:

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

    [FLINK-7258] [network] Fix watermark configuration order

    ## Purpose
    This PR changes the order in which low and high watermarks are configured 
for Netty server child connections (high first). That way we avoid running into 
an `IllegalArgumentException` when the low watermark is larger than the high 
watermark (relevant if the configured memory segment size is larger than the 
default).
    
    This situation surfaced only as a logged warning and the low watermark 
configuration was ignored.
    
    ## Changelog
    - Configure high watermark before low watermark in `NettyServer`
    - Configure high watermark before low watermark in `KvStateServer`
    
    ## Verifying this change
    - The change is pretty trivial with an extended 
`NettyServerLowAndHighWatermarkTest` that now checks the expected watermarks.
    - I didn't add a test for `KvStateServer`, because the watermarks can't be 
configured there manually.
    - To verify, you can run `NettyServerLowAndHighWatermarkTest` with logging 
before and after this change and verify that no warning is logged anymore.
    
    ## 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**
    - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
    
    ## Documentation
    - Does this pull request introduce a new feature? **no**
    - If yes, how is the feature documented? **not applicable**


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

    $ git pull https://github.com/uce/flink 7258-watermark_config

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

    https://github.com/apache/flink/pull/4391.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 #4391
    
----
commit 73998ba1328d4bf61ee979ed327b0a684ed03aa7
Author: Ufuk Celebi <[email protected]>
Date:   2017-07-24T16:47:23Z

    [FLINK-7258] [network] Fix watermark configuration order
    
    When configuring larger memory segment sizes, configuring the
    low watermark before the high watermark may lead to an
    IllegalArgumentException, because the low watermark will
    temporarily be higher than the high watermark. It's necessary
    to configure the high watermark before the low watermark.
    
    For the queryable state server in KvStateServer I didn't
    add an extra test as the watermarks cannot be configured there.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to