fluss icon indicating copy to clipboard operation
fluss copied to clipboard

Use WAL changelog mode for sys.consumer_offsets to reduce offset commit overhead

Open wuchong opened this issue 2 weeks ago • 0 comments

Search before asking

  • [x] I searched the repository issues and found no existing task for this change.

Description

Set table.changelog.image to WAL when ConsumerGroupManager creates sys.consumer_offsets.

Each offset commit upserts the group's metadata row and all submitted offsets in one batch. The table currently inherits FULL, so updating an existing row requires an old-value lookup and writes both UPDATE_BEFORE and UPDATE_AFTER to the replicated changelog. This also happens when a commit rewrites the same group metadata. With WAL, the existing full-row upsert path can skip the old-value lookup and write a single UPDATE_AFTER. The saving applies to both the metadata row and the offset rows.

For example, with a 32-byte group ID, updating the existing group metadata adds 150 bytes to the encoded changelog in FULL mode. The same update needs 75 bytes in WAL mode, excluding the shared batch header.

Extend the system-table creation test to assert the persisted changelog mode. Verify that a second commit for the same bucket returns the latest offset on fetch and that the group can still be listed. Existing clusters reuse the stored table descriptor, so the creation-time setting applies to newly created system tables.

Willingness to contribute

  • [ ] I'm willing to submit a PR.

wuchong avatar Nov 18 '26 14:11 wuchong