Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21004 +/- ##
=========================================
Coverage 80.95% 80.95%
Complexity 36550 36550
=========================================
Files 2593 2593
Lines 148934 148979 +45
Branches 18529 18535 +6
=========================================
+ Hits 120571 120610 +39
- Misses 20000 20004 +4
- Partials 8363 8365 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
danny0405
reviewed
Dec 2, 2026
Collaborator
danny0405
approved these changes
Dec 2, 2026
danny0405
left a comment
Contributor
There was a problem hiding this comment.
+1, let's make the CI pass
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the issue this Pull Request addresses
Closes apache/hudi#20993.
The Flink stream writer uses a
StableSortBuffereven for data buckets and record-index batches that it reads in arrival order. On these paths, the buffer stores an 8-byte row offset and a 1-byte normalized key per row, then looks up each offset during flush. The rows are already laid out in the required order, so the index consumes writer memory without changing the output order.Summary and Changelog
Commit:
perf(flink): buffer unsorted data and index writes in sequential pages(3994b655525)SequentialRowDataBufferfor non-LSM data buckets and forIndexWriteFunction. LSM data buckets retainStableSortBufferso they still sort by record key and preserve arrival order for equal keys.Impact
Buffer usage for 100,000
BIGINT/VARBINARYrows with 32 KiB pages:Both inputs saved 896 KiB and preserved row contents and order. LSM sorting is unchanged. End-to-end performance was not measured.
Risk Level
Medium. This changes buffering on two Flink write paths, where incorrect page traversal or reuse after a failed append could lose or corrupt rows. On the final commit, 53 targeted tests passed on Flink 1.20.1 with JDK 17. Coverage includes cross-page nested rows, mid-append exhaustion, bucket preemption and retry, checkpoint flushes, managed-page reclamation, and a record-index update after a pressure-triggered flush.
Documentation Update
none
Contributor's checklist