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 2020/04/04 13:20:13 UTC

[GitHub] [flink] pnowojski commented on a change in pull request #11567: [FLINK-16645] Limit the maximum backlogs in subpartitions

pnowojski commented on a change in pull request #11567: [FLINK-16645] Limit the maximum backlogs in subpartitions
URL: https://github.com/apache/flink/pull/11567#discussion_r403469452
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
 ##########
 @@ -375,4 +398,33 @@ void onConsumedSubpartition(int subpartitionIndex) {
 	private void checkInProduceState() throws IllegalStateException {
 		checkState(!isFinished, "Partition already finished.");
 	}
+
+	/**
+	 * Check whether all subpartitions' backlogs are less than the limitation of max backlogs, and make this partition
+	 * available again if yes.
+	 */
+	@GuardedBy("buffers")
 
 Review comment:
   I would expect the smallest atomic writes/reads would be bytes, not bits. With longs, threads performing
   ```
   long l = bitSet[i];
   l |= 1 << n;
   bitSet[i] = l;
   ```
   would be overriding bits from other threads sharing the same long. So you would need single byte per subpartition.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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