Skip to content

Protect against out of band writes to sqlite #366

@gorbak25

Description

@gorbak25

Circumventing the corrosion API and inserting data directly into the sqlite db is not supported. Such OOB writes are not replicated to other nodes. When corrosion encounters OOB mutations it will think it missed some messages from other nodes, create an entry in the __corro_bookkeeping_gaps table and wait forever for the missing db_version.

To prevent accidental OOB writes I suggest modifying https://github.com/superfly/cr-sqlite to reject all writes unless the ENABLE_WRITES pragma on the connection is enabled. This way people attempting OOB inserts will get notified that those changes won't be synced by corrosion.

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