Skip to content

Handle the case that RewriteFiles and RowDelta commit the transaction at the same time #2308

@openinx

Description

@openinx

Since we've introduced row-level delete in format v2, so we will encounter the problem that RewriteFiles and RowDelta commit the transaction at the same time.

Assume that we have an iceberg table test, and has the following events:

INSERT   <1, 'AAA'>
INSERT   <2, 'BBB'>
DELETE   <1, 'AAA'>

At the timestamp t1, someone start a rewrite action to rewrite the whole table.

At the timestamp t2, someone start another transaction to update the rows in table test:

DELETE <2, 'BBB'>

At the timestamp t3, the update txn (which started from t2) commit the txn successfully.

At the timestamp t4, the rewrite action commit the txn successfully.

Finally, the table will have one row <2, 'BBB'>, while in fact we should have no rows. That's an unexpected bug after introducing format v2, and we will need solution to handle it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions