Skip to content

Implicit transaction starts #7384

Open
Open
@mrotteveel

Description

@mrotteveel

Firebird currently requires explicit transaction starts from client to server, which require one network roundtrip to start a transaction. A lot of competitors use implicit transaction starts, which reduces network overhead.

My initial proposal for implicit transaction starts has the following components:

  1. A connection has a default transaction handle (e.g. some constant that is the same for all connections, either a low number (e.g. 0 or 1), or very high)
  2. The default transaction handle (or connection) has a "transaction configuration", which defaults to read write/wait/snapshot (the default of SET TRANSACTION without any clauses)
  3. This default configuration can be configured in some way (new op-code, or maybe we can do something special with op_transaction?)
  4. Passing the default transaction handle with an operation will do one of the following (server-side!)
    • no current transaction: start one with the current "transaction configuration" and associate it with the handle
    • active transaction: use it (same as with normal transaction handles)
    • prepared transaction: raise error (same as with normal transaction handles)
  5. Commit/prepare/rollback will behave as normal

In this design, explicit transaction starts are still possible, as are multiple parallel transactions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions