Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

Client-Side Transactions

...

Assuming initially object ID 1 contains A, 2 contains B, 3 contains C.

  1. Client reserves txid
  2. Client writes A, B, C with lien to txid for some time (how long? see below)
  3. Client writes T with (A', B', C') at txidwrites placeholder T with object IDs (1, 2, 3)
  4. Client adds masks to objects 1, 2, 3 which all point to T
  5. Client updates T with (write A' at 1 over version V1, write B' at 2 over version V2, write C' at 3 over version V3)
  6. Client writes A' into A1, B' into B2, C' into C3
  7. Client deletes T

Consequences

  • 1:A, 2:B, 3:C appear an extra time in the log with the liens(when they are masked).
  • A', B', C' appear twice an extra time in the log (in T).
  • Client clocks must be synchronized The objects in a transaction should have lien expiry times larger than the time it takes to recover a server: this could be a relatively long time. If the client crashes (instead of a server), the objects involved must stay locked until the lien expires.and/or other clients must always wait some amount of time before aborting a transaction
  • Blind (unconditional) updates, deletes, and creates modifications are no longer possible as the objects they operate on may have liensbe masked.
  • Can only support creates using server-assigned object IDs if it is acceptable to burn object IDs when clients crash.
  • It'd be hard to do this safely if we need to consider access control. (We don't with namespaces.)

Server-Side Transactions (2PC)

...