You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/31 12:06:13 UTC

[GitHub] pnowojski commented on a change in pull request #6974: [FLINK-10727][network] remove unnecessary synchronization in SingleInputGate#requestPartitions()

pnowojski commented on a change in pull request #6974: [FLINK-10727][network] remove unnecessary synchronization in SingleInputGate#requestPartitions()
URL: https://github.com/apache/flink/pull/6974#discussion_r229666072
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGate.java
 ##########
 @@ -477,8 +477,8 @@ public boolean isFinished() {
 
 	@Override
 	public void requestPartitions() throws IOException, InterruptedException {
-		synchronized (requestLock) {
-			if (!requestedPartitionsFlag) {
+		if (!requestedPartitionsFlag) {
 
 Review comment:
   1. please revert order of if/else for simplicity
   2. you are effectively making this method not thread safe, which might be some "gotcha" moment for some future developer 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services