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 2019/07/08 03:21:36 UTC

[GitHub] [flink] liyafan82 commented on a change in pull request #8613: [FLINK-12730][Runtime / Coordination] Combine BitSet implementations in flink-runtime

liyafan82 commented on a change in pull request #8613: [FLINK-12730][Runtime / Coordination] Combine BitSet implementations in flink-runtime
URL: https://github.com/apache/flink/pull/8613#discussion_r300910263
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BitSet.java
 ##########
 @@ -89,8 +88,13 @@ public int bitSize() {
 	 * Clear the bit set.
 	 */
 	public void clear() {
-		for (int i = 0; i < byteLength; i++) {
-			memorySegment.put(offset + i, (byte) 0);
+		int index = 0;
+		while (index < byteLength) {
 
 Review comment:
   @StefanRRichter , thanks a lot for your careful review. 
   
   It is a real bug. I have fixed it. In addition, I have added test cases by making BitSetTest parameterized. So the clear method is tested against different amounts of bits. 
   

----------------------------------------------------------------
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