[PR] [BP][FLINK-35169][runtime] Recycle buffers to freeSegments before releasing data buffer for sort accumulator [flink]

2024-04-21 Thread via GitHub


TanYuxin-tyx opened a new pull request, #24695:
URL: https://github.com/apache/flink/pull/24695

   
   
   ## What is the purpose of the change
   
   Backport to Flink 1.19 for 
https://github.com/apache/flink/pull/24688#event-12553480360
   
   *When using sortBufferAccumulator, we should recycle the buffers to 
freeSegments before releasing the data buffer. The reason is that when getting 
buffers from the DataBuffer, it may require more buffers than the current 
quantity available in freeSegments. Consequently, to ensure adequate buffers 
from DataBuffer, the flushed and recycled buffers should also be added to 
freeSegments for reuse.*
   
   
   ## Brief change log
   
 - *Reuse the recycled buffers before releasing data buffer for sort 
accumulator*
   
   
   ## Verifying this change
   
   
   This change is already covered by added tests 
*SortBufferAccumulatorTest#testReuseRecycledBuffersWhenFlushDataBuffer*.
   
   
   ## 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): (no)
 - 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)
 - If yes, how is the feature documented? (not documented)


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



Re: [PR] [BP][FLINK-35169][runtime] Recycle buffers to freeSegments before releasing data buffer for sort accumulator [flink]

2024-04-21 Thread via GitHub


flinkbot commented on PR #24695:
URL: https://github.com/apache/flink/pull/24695#issuecomment-2068471232

   
   ## CI report:
   
   * 4923275887fdcdfe189f070894fd779dc8fe0f46 UNKNOWN
   
   
   Bot commands
 The @flinkbot bot supports the following commands:
   
- `@flinkbot run azure` re-run the last Azure build
   


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