Skip to content

debezium/dbz#1879 Add SMT EnforceRecordSize#284

Open
twthorn wants to merge 1 commit into
debezium:mainfrom
twthorn:debezium/dbz#1879
Open

debezium/dbz#1879 Add SMT EnforceRecordSize#284
twthorn wants to merge 1 commit into
debezium:mainfrom
twthorn:debezium/dbz#1879

Conversation

@twthorn
Copy link
Copy Markdown
Contributor

@twthorn twthorn commented May 15, 2026

debezium/dbz#1879

Add an SMT for enforcing record size with the current strategy of proportional column truncation.

We still need to performance test this. Some optimizations with caching may be needed.

We may support other strategies in the future, one such is payload offloading debezium/dbz#1949

Signed-off-by: Thomas Thornton <thomaswilliamthornton@gmail.com>
Copy link
Copy Markdown
Member

@Naros Naros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether there should be more surgical algorithms, such as largest-first or greedy. I also wonder if the SMT should explicitly prefer a list of field names.

Let's say we have an event with 10 fields, 9 of which are 10 bytes each, and one is 5000 bytes, for a total of 5090 bytes. If we assume that the event's size exceeds a 2000-byte threshold, all 9 smaller fields are dropped to 6 bytes, which I think risks making the entire event potentially irrelevant.

Let's wait and see how Jiri views the PR behavior; maybe he sees something I am glossing over.

@jpechane
Copy link
Copy Markdown
Contributor

@twthorn Hi, thanks for the PR! Two comments

  • Is this something that is Vitess specific? If not then the SMT could/should reside in the core repository
  • Could you please check ApproximateStructSizeCalculator? Is there is opportunity to re-use the class or extend it so it is usable with the SMT too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants