You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "platinumhamburg (via GitHub)" <gi...@apache.org> on 2026/09/07 10:00:16 UTC

[I] [KV] Flushed entries remain reachable through previousEntry chains in KvPreWriteBuffer [fluss]

platinumhamburg opened a new issue, #4243:
URL: https://github.com/apache/fluss/issues/4243

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
   
   
   ### Fluss version
   
   0.9.0 (latest release)
   
   ### Please describe the bug 🐞
   
   When a key is updated, `KvPreWriteBuffer` creates a new `KvEntry` whose `previousEntry` references the previous version.
   
   During `completeFlush()`, flushed entries are removed from `allKvEntries`, marked as `FLUSHED`, and deducted from `pendingFlushBytes`. However, their `previousEntry` references are not cleared. If a newer version of the same key remains buffered, it can keep flushed entries and their value arrays reachable.
   
   With sustained updates to the same key across successive flushes, this chain can grow and retain substantial heap memory. These retained values are no longer included in `pendingFlushBytes`, so buffer accounting understates actual memory retention. This may eventually cause excessive GC or heap OOM.
   
   #### Reproduction Scenario
   
   1. Continuously update the same key.
   2. Flush earlier versions while newer versions remain buffered.
   3. Repeat across multiple flush cycles.
   4. Inspect the `previousEntry` chain reachable from a buffered entry.
   
   Already-flushed versions remain reachable through the chain instead of becoming eligible for garbage collection.
   
   ### Solution
   
   Consider clearing each successfully flushed entry's `previousEntry` in `completeFlush()`, while preserving rollback semantics for ACTIVE/PREPARED entries.
   
   
   ### Are you willing to submit a PR?
   
   - [ ] 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: issues-unsubscribe@fluss.apache.org.apache.org

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


Re: [I] [KV] Flushed entries remain reachable through previousEntry chains in KvPreWriteBuffer [fluss]

Posted by "platinumhamburg (via GitHub)" <gi...@apache.org>.
platinumhamburg closed issue #4243: [KV] Flushed entries remain reachable through previousEntry chains in KvPreWriteBuffer
URL: https://github.com/apache/fluss/issues/4243


-- 
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-unsubscribe@fluss.apache.org

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