Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 2.82 KB

File metadata and controls

72 lines (59 loc) · 2.82 KB

Transaction Pattern Analysis for Database Engines

Engines Using Two-Function Pattern (executeInTransactionMode/executeInAutoCommitMode)

These engines have already been refactored to use the consistent pattern:

  1. ClickHouse - /backend/plugin/db/clickhouse/clickhouse.go
  2. DM - /backend/plugin/db/dm/dm.go
  3. MySQL - /backend/plugin/db/mysql/mysql.go
  4. MSSQL - /backend/plugin/db/mssql/mssql.go
  5. Oracle - /backend/plugin/db/oracle/oracle.go
  6. Redshift - /backend/plugin/db/redshift/redshift.go
  7. Snowflake - /backend/plugin/db/snowflake/snowflake.go
  8. TiDB - /backend/plugin/db/tidb/tidb.go

Engines Using If-Else Pattern (Need Refactoring)

These engines still use the old if-else pattern and need to be refactored:

  1. CockroachDB - /backend/plugin/db/cockroachdb/cockroachdb.go
  2. Databricks - /backend/plugin/db/databricks/databricks.go
  3. PostgreSQL - /backend/plugin/db/pg/pg.go
  4. RisingWave - /backend/plugin/db/risingwave/risingwave.go
  5. Spanner - /backend/plugin/db/spanner/spanner.go
  6. StarRocks - /backend/plugin/db/starrocks/starrocks.go

Engines Without Transaction Mode Handling

These engines don't implement transaction mode handling (might not need it):

  1. BigQuery - No transaction mode pattern found
  2. Cassandra - No transaction mode pattern found
  3. CosmosDB - No transaction mode pattern found
  4. Hive - No transaction mode pattern found (explicitly notes transactions not supported)
  5. OceanBase (OBO) - No transaction mode pattern found
  6. SQLite - No transaction mode pattern found
  7. Trino - No transaction mode pattern found

Missing LogTransactionControl Calls

Engines with Transactions but NO LogTransactionControl:

  1. StarRocks - Has Begin/Commit/Rollback but no transaction logging
  2. RisingWave - Has Begin/Commit/Rollback but no transaction logging
  3. OceanBase (OBO) - Has Begin/Commit/Rollback in obo.go but no transaction logging

Engines with Proper LogTransactionControl:

  1. ClickHouse - Has logging (but uses old API format)
  2. CockroachDB - Has proper logging
  3. DM - Has proper logging
  4. MSSQL - Has proper logging
  5. MySQL - Has proper logging
  6. Oracle - Has proper logging
  7. PostgreSQL - Has proper logging
  8. Redshift - Has proper logging
  9. Snowflake - Has proper logging
  10. TiDB - Has proper logging

Action Items

High Priority (Refactor to Two-Function Pattern):

  1. CockroachDB
  2. PostgreSQL
  3. RisingWave
  4. StarRocks
  5. Spanner
  6. Databricks

Add Missing LogTransactionControl:

  1. StarRocks
  2. RisingWave
  3. OceanBase (OBO)

Fix ClickHouse LogTransactionControl:

  • ClickHouse uses old API format: opts.LogTransactionControl("BEGIN")
  • Should be: opts.LogTransactionControl(storepb.TaskRunLog_TransactionControl_BEGIN, "")