reswqa commented on code in PR #22447:
URL: https://github.com/apache/flink/pull/22447#discussion_r1176029546
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolTest.java:
##########
@@ -878,6 +874,18 @@ private void assertRequestedBufferAndIsAvailable(
// Helpers
// ------------------------------------------------------------------------
+ private static int getNumberRequestedOverdraftBuffers(LocalBufferPool
bufferPool) {
+ return bufferPool.getNumberOfRequestedMemorySegments() >
bufferPool.getNumBuffers()
+ ? bufferPool.getNumberOfRequestedMemorySegments() -
bufferPool.getNumBuffers()
+ : 0;
Review Comment:
Good suggestion! 👍
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolTest.java:
##########
@@ -878,6 +874,18 @@ private void assertRequestedBufferAndIsAvailable(
// Helpers
// ------------------------------------------------------------------------
+ private static int getNumberRequestedOverdraftBuffers(LocalBufferPool
bufferPool) {
+ return bufferPool.getNumberOfRequestedMemorySegments() >
bufferPool.getNumBuffers()
+ ? bufferPool.getNumberOfRequestedMemorySegments() -
bufferPool.getNumBuffers()
+ : 0;
+ }
+
+ private static int getNumberRequestedOrdinaryBuffers(LocalBufferPool
bufferPool) {
+ return bufferPool.getNumberOfRequestedMemorySegments() >
bufferPool.getNumBuffers()
+ ? bufferPool.getNumBuffers()
+ : bufferPool.getNumberOfRequestedMemorySegments();
Review Comment:
Good suggestion! 👍
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]