Skip to content

Different backends may simultaneously mark different placements of the same shard as inactive #592

@metdos

Description

@metdos

Notes of @marcocitus from PR #552.

transaction A fails to connect to placement 1 (or other error), marked inactive
transaction B performs an insert on placement 1
transaction A performs an insert on placement 2
transaction B fails to connect to placement 2 (or other error), marked inactive

A possible fix this issue would be to grab an exclusive lock before changing placement metadata and once the lock is obtained re-read the finalized placement list and only mark placements as inactive if it leaves at least 1 healthy placement from the list and error out otherwise (guaranteeing >= 1 healthy placements). In that case, whichever transaction takes the lock first will be the one whose writes will remain visible, and the other one will become hidden.

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