Skip to content

Concurrent DELETEs to the same chunk group can drop delete marks #4

Description

@jdatcmd

Summary

Concurrent DELETEs that touch the same chunk group can lose one transaction's delete marks.

Detail

Deletes are recorded by setting bits in a single shared columnar.row_mask heap tuple per (storage id, stripe, chunk group). When two transactions concurrently delete different rows in the same chunk group, they contend on that one tuple. Under READ COMMITTED a last-writer-wins update to the mask can drop the delete bits set by the other transaction, so a row that was deleted can remain visible.

Single-session correctness is not affected. This only occurs with concurrent writers to the same chunk group.

Source

src/columnar_row_mask.c.

Why it is not a quick fix

A correct fix needs row-level locking on the mask or a merge of concurrent mask updates rather than a full-tuple overwrite. That is a design change, not a targeted patch, which is why it is tracked separately rather than bundled into the delete implementation.

Status

Documented in the README limitations section. Tracked here for a future dedicated pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions