reswqa opened a new pull request, #22084:
URL: https://github.com/apache/flink/pull/22084

   ## What is the purpose of the change
   
   *In our current implementation, once there is no available buffer, overdraft 
buffers can. be requested, which does not meet our requirements for the name 
the `overdraft`. In fact, we expect only request additional buffers when the 
pool size is reached.*
   
   *Another key point is the definition of LocalBufferPool's `available` 
status. Actually, before overdraft buffer was introduced, its definition was 
very clear: 
   There is at least one `availableMemorySegment` and no subpartitions has 
reached `maxBuffersPerChannel`. 
   IMO, Introducing the overdraft mechanism should not break this protocol. 
Otherwise, it may cause some very hidden bugs. 
   It should be noted that even if we only allow request overdraft buffers 
after reaches the `poolSize`, there may still be a situation where both 
`availableMemorySegment` and overdraft buffer are all not zero, and this state 
should obviously be defined as available.*
   
   
   ## Brief change log
   
     - *Add missing @GuardedBy annotation for LocalBufferPool.*
     - *LocalBufferPool request overdraft buffer only when no available buffer 
and pool size is reached.*
   
   
   ## Verifying this change
   
   Manually test this change by running TPC-DS and added unit tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): yes
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
   


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to