flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8375) Remove unnecessary synchronization in ResultPartition
Date Mon, 08 Jan 2018 15:05:00 GMT

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

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

GitHub user NicoK opened a pull request:

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

    [FLINK-8375][network] Remove unnecessary synchronization

    ## What is the purpose of the change
    
    Synchronized blocks in ResultPartition could affect only:
    1. totalNumberOfBuffers and totalNumberOfBytes counters
    2. subpartition add(), finish() and release() calls.
    
    However:
    1. accessors to the counters where not synchronized.
    2a. add(), finish() and release() methods for PipelinedSubpartition were already threads
safe
    2b. add(), finish() and release() methods for SpillableSubpartition were made thread safe
in
    this commit, by basically pushing synchronized section down one level.
    
    Please refer to dataArtisans/flink#1 (commits by @pnowojski, review by me: LGTM).
    This PR is based on #5259 and #4559.
    
    ## Brief change log
    
    - push synchronization down from `ResultPartition` where necessary
    - remove collection unnecessary statistics in `ResultPartition` (those required synchronization
but could be gathered from the subpartitions if we decided to ever include them again)
    
    ## Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    ## 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): **yes**
      - 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? **not applicable**


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

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

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

    https://github.com/apache/flink/pull/5260.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 #5260
    
----
commit fada3022186670851a3956a961f490e6d86e2a53
Author: Nico Kruber <nico@...>
Date:   2017-12-13T14:28:08Z

    [hotfix][checkstyle] only ignore checkstyle in existing packages under runtime.io.network
    
    - ignore runtime.io.(async|disk)
    - ignore runtime.io.network.(api|buffer|netty|partition|serialization|util)
    -> everything else will be checked against the ruleset
    - fix checkstyle errors in classes directly under runtime.io.network

commit f8dff47a707c4e7572d02e072197927ec2ce2ef7
Author: Nico Kruber <nico@...>
Date:   2017-12-14T16:30:19Z

    [FLINK-8252][benchmarks] convert network benchmarks to streaming benchmarks
    
    This allows us to use the output flushing interval as a parameter to evaluate,
    too.

commit a4980ae85bac1dca9f8939e0dc3c8839991ed5e8
Author: Zhijiang <wangzhijiang999@...>
Date:   2017-08-17T11:38:45Z

    [FLINK-7468][network] Implement sender backlog logic for credit-based

commit 0da032b3e7b90da2cbee5ca6f051667add104ac6
Author: Piotr Nowojski <piotr.nowojski@...>
Date:   2018-01-05T14:28:40Z

    [FLINK-8375][network] Remove unnecessary synchronization
    
    Synchronized blocks in ResultPartition could affect only:
    1. totalNumberOfBuffers and totalNumberOfBytes counters
    2. subpartition add(), finish() and release() calls.
    
    However:
    1. counters were not used anywhere - they are removed by this commit
    2a. add(), finish() and release() methods for PipelinedSubpartition were already threads
safe
    2b. add(), finish() and release() methods for SpillableSubpartition were made thread safe
in
    this commit, by basically pushing synchronized section down one level.

----


> Remove unnecessary synchronization in ResultPartition
> -----------------------------------------------------
>
>                 Key: FLINK-8375
>                 URL: https://issues.apache.org/jira/browse/FLINK-8375
>             Project: Flink
>          Issue Type: Improvement
>          Components: Network
>            Reporter: Piotr Nowojski
>            Assignee: Piotr Nowojski
>             Fix For: 1.5.0
>
>
> {{PipelinedSubpartition}} doesn't need this extra synchronization in {{ResultPartition}}
so the locking from {{ResultPartition}} can be safely pushed down to {{SpillableSubpartition}}.



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

Mime
View raw message