[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748188#comment-15748188 ] ASF GitHub Bot commented on FLINK-5002: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2865 > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748080#comment-15748080 ] ASF GitHub Bot commented on FLINK-5002: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2865 Thanks, looks good. Merging this... > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728590#comment-15728590 ] ASF GitHub Bot commented on FLINK-5002: --- Github user MayerRoman commented on the issue: https://github.com/apache/flink/pull/2865 Please check changes. I removed the test and add a check in method. > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15725804#comment-15725804 ] ASF GitHub Bot commented on FLINK-5002: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2865 Looks good. The test is almost a bit overkill, I think. A adding a simple `Math.max(0, value)` to ensure the value is non-negative probably does the trick. > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15723962#comment-15723962 ] Ted Yu commented on FLINK-5002: --- Can a committer review, please ? > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15709854#comment-15709854 ] Ted Yu commented on FLINK-5002: --- lgtm > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15695114#comment-15695114 ] ASF GitHub Bot commented on FLINK-5002: --- GitHub user MayerRoman opened a pull request: https://github.com/apache/flink/pull/2865 [FLINK-5002] Renamed getNumberOfUsedBuffers() method to bestEffortGetNumOfUsedBuffers(), add a test to check that it does not return a negative value [FLINK-5002] Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers According to Stefan proposal, I renamed the method and added test to make sure that the method does not return a negative value. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MayerRoman/flink FLINK_5002 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2865.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 #2865 commit 5b7a17f54d37ac028335343742ba7021e047ca64 Author: Roman MaierDate: 2016-11-18T13:51:58Z [FLINK-5002] Renamed getNumberOfUsedBuffers() method to bestEffortGetNumOfUsedBuffers(), add a test to check that it does not return a negative value. > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15682680#comment-15682680 ] Roman Maier commented on FLINK-5002: Here is a link to the commit: https://github.com/MayerRoman/flink/commit/cacedd5f963dd4d405f940d92a0487fd5a1d1719 > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15677332#comment-15677332 ] Stephan Ewen commented on FLINK-5002: - The link is referring to opening a pull request. Can you post the proper commit link? > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15676805#comment-15676805 ] Roman Maier commented on FLINK-5002: Please check the implementation of this issue: https://github.com/apache/flink/compare/master...MayerRoman:FLINK-5002?expand=1 > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Assignee: Roman Maier >Priority: Minor > Labels: easyfix, starter > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15654356#comment-15654356 ] Ted Yu commented on FLINK-5002: --- Sounds good. > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Priority: Minor > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-5002) Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers
[ https://issues.apache.org/jira/browse/FLINK-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15644500#comment-15644500 ] Stephan Ewen commented on FLINK-5002: - I am skeptical about that - these methods are used by metric gauges and should not interfere with the main threads. Alternatively, we could rename the methods to {{bestEffortGetNumBuffers()}} and make sure they at least do not return a negative value. > Lack of synchronization in LocalBufferPool#getNumberOfUsedBuffers > - > > Key: FLINK-5002 > URL: https://issues.apache.org/jira/browse/FLINK-5002 > Project: Flink > Issue Type: Bug >Reporter: Ted Yu >Priority: Minor > > {code} > public int getNumberOfUsedBuffers() { > return numberOfRequestedMemorySegments - availableMemorySegments.size(); > } > {code} > Access to availableMemorySegments should be protected with proper > synchronization as other methods do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)