chrisdutz opened a new pull request, #19174: URL: https://github.com/apache/iotdb/pull/19174
## Description With a small WAL buffer, as in the edge profile (`wal_buffer_size_in_byte` = 1 MB, which is also the default `wal_entry_size_limit_in_byte`), a memtable below the 8 MB `wal_memtable_snapshot_threshold_in_byte` can still be larger than one WAL entry. In that case, every snapshot attempt: 1. rolled the WAL file under the region's write lock, 2. was refused by `WALBuffer.write` because the entry is too large, 3. logged an ERROR with a stack trace. Only the next cleanup cycle then flushed the memtable. `WALNode.trySnapshotOrFlushMemTable` now flushes right away when the memtable's TVList RAM cost exceeds the WAL entry size limit. It's a one-line condition next to the existing snapshot-threshold check. ## Tests The datanode WAL tests (`WAL*Test`, `Wal*Test`, 117 tests) pass. The change was found and verified while running write benchmarks with the edge profile settings: the ERRORs and the extra WAL rolls are gone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
