Skip to content

fix(datafusion): avoid replaying DML after an uncertain commit - #1587

Open
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:rest-update-repro
Open

QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:rest-update-repro

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

DataFusion searched the entire commit error for conflict text. If REST published a snapshot and then returned an error containing Row ID conflict or Delete conflict, DataFusion could run the UPDATE again. A single value = value + 1 changed 10 to 12.

Brief change log

Classify conflicts from the top-level Paimon error. Genuine row-ID and delete conflicts still trigger replanning on their respective paths. An uncertain commit outcome propagates to the caller.

Tests

  • Unit tests cover typed row-ID retries and rejection of the opposite conflict prefix.
  • REST tests verify that data-evolution and copy-on-write UPDATEs both report an uncertain outcome after publication and leave the value at 11.

API and Format

No public API or storage format changes.

Documentation

No documentation update required.

A REST error can contain conflict text after the snapshot is published.
Matching the formatted error chain could execute an UPDATE twice.
Classify only top-level Paimon conflicts before retrying DML.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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.

1 participant