Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.16.1
Description
As we discussed in FLINK-31610, new buffers can be requested only when "numOfRequestedMemorySegments + numberOfRequestedOverdraftMemorySegments < poolSize + maxOverdraftBuffersPerGate".
Consider such a scenario, the CurrentPoolSize = 5, numOfRequestedMemorySegments = 7, maxOverdraftBuffersPerGate = 2. If numberOfRequestedOverdraftMemorySegments = 0, then 2 buffers can be requested now.
We should convert numberOfRequestedMemorySegments to numberOfRequestedOverdraftMemorySegments when poolSize is decreased. Further more, we can changes the definition of overdraft buffer from static to dynamic:
- When numberOfRequestedMemorySegments <= poolSize, all buffers are ordinary buffer
- When numberOfRequestedMemorySegments > poolSize, the `ordinary buffer size = poolSize`, and `the overdraft buffer size = numberOfRequestedMemorySegments - poolSize`
This allows us to remove numberOfRequestedOverdraftMemorySegments, which helps us simplify logic and maintain consistency.
Attachments
Issue Links
- relates to
-
FLINK-31610 Refactoring of LocalBufferPool
- Open
- links to