Skip to content

[kv] Fix non-target columns not being nulled during partial update on first insert#3157

Merged
luoyuxia merged 1 commit intoapache:release-0.9from
luoyuxia:backport-0af3478-release-0.9
Apr 22, 2026
Merged

[kv] Fix non-target columns not being nulled during partial update on first insert#3157
luoyuxia merged 1 commit intoapache:release-0.9from
luoyuxia:backport-0af3478-release-0.9

Conversation

@luoyuxia
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #2843

This pull request backports the fix from #2969 to release-0.9.

It fixes a bug where partialUpdate on a Primary Key table during a first insert incorrectly preserved values for non-target columns from the client row instead of nulling them out.

Brief change log

  • Added mergeInsert(BinaryValue newValue) to RowMerger and implemented the partial-update insert path in the relevant row merger classes.
  • Updated KvTablet.processUpsert() to apply currentMerger.mergeInsert(currentValue) before applyInsert() so first-insert partial updates go through the same merge semantics.
  • Backported the corresponding unit and integration test coverage for first-insert partial-update behavior.

Tests

  • ./mvnw -pl fluss-server -am -Dtest=KvTabletTest,FirstRowRowMergerTest,VersionedRowMergerTest -Dsurefire.failIfNoSpecifiedTests=false -Drat.skip=true test

API and Format

No. This is an internal bug fix and does not change public APIs or storage formats.

Documentation

No. This change fixes existing behavior and does not require documentation updates.

@luoyuxia luoyuxia merged commit 5b79845 into apache:release-0.9 Apr 22, 2026
6 checks passed
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.

2 participants