You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/24 17:17:28 UTC

[jira] [Commented] (FLINK-7258) IllegalArgumentException in Netty bootstrap with large memory state segment size

    [ https://issues.apache.org/jira/browse/FLINK-7258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16098781#comment-16098781 ] 

ASF GitHub Bot commented on FLINK-7258:
---------------------------------------

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 <uc...@apache.org>
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.

----


> IllegalArgumentException in Netty bootstrap with large memory state segment size
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-7258
>                 URL: https://issues.apache.org/jira/browse/FLINK-7258
>             Project: Flink
>          Issue Type: Bug
>          Components: Network
>    Affects Versions: 1.3.1
>            Reporter: Ufuk Celebi
>            Assignee: Ufuk Celebi
>            Priority: Minor
>
> In NettyBootstrap we configure the low and high watermarks in the following order:
> {code}
> bootstrap.childOption(ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, config.getMemorySegmentSize() + 1);
> bootstrap.childOption(ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, 2 * config.getMemorySegmentSize());
> {code}
> When the memory segment size is higher than the default high water mark, this throws an `IllegalArgumentException` when a client tries to connect. Hence, this unfortunately only happens during runtime when a intermediate result is requested. This doesn't fail the job, but logs a warning and ignores the failed configuration attempt, potentially resulting in degraded performance because of a lower than expected watermark.
> A simple fix is to first configure the high water mark and only then configure the low watermark.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)