brownsys / K9db

MySQL-compatible database for GDPR compliance by construction.
MIT License
30 stars 0 forks source link

Consistency / Transactions / Integrity #139

Closed KinanBab closed 1 year ago

KinanBab commented 2 years ago

We currently have several sources of potential inconsistency:

  1. No synchronization between tables and views ---> inconsistency when indices are updated during a concurrent table update (e.g. #118)
  2. No synchronization between copies of the same record being moved/deleted/modified.
  3. No synchronization between tables and Rocksdb Indices

Potential solution

  1. Table-level locks in rocksdb connection or similar, which are acquired even when reading from views that are based on the tables. We use rocksdb transactions!

Transactions/atomicity:

  1. Failure of sub-operations of a single logical operations (e.g. cascading variable ownership delete, updating mutliple copies of the same shared row) does not rollback.

Integrity:

  1. Uniqueness of PK is not enforced and results in replace: consistency issue with views that do not see the replace (#134)
  2. Integrity of FK is not enforced.
KinanBab commented 1 year ago

Cleanups for after the deadline:

Integrity (Consistency as in ACID):

Transactions:

Consistency (as in linearizability vs eventual):

Isolation:

KinanBab commented 1 year ago