fresh-borzoni opened a new issue, #3320: URL: https://github.com/apache/fluss/issues/3320
### Search before asking - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar. ### Description FlussUpsertPartitionReader.createLogChangesIterator() materializes the full log tail in mutable.ArrayBuffer and sort before merging. So memory grows with total log records. LakeSnapshotAndLogSplitScanner.pollLogRecords() already implements the right pattern - TreeMap keyed by PK with eager per-PK collapse on put. So memory grows with distinct PKs. This is the better pattern and more unified one, so let's do it. ### Willingness to contribute - [x] I'm willing to submit a PR! -- 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]
