Skip to content

feat: Add Google Cloud Spanner database support across Flowable engines - #4294

Open
Vaibhavch9876 wants to merge 8 commits into
flowable:mainfrom
Vaibhavch9876:spanner-migration
Open

Vaibhavch9876 wants to merge 8 commits into
flowable:mainfrom
Vaibhavch9876:spanner-migration

Conversation

@Vaibhavch9876

Copy link
Copy Markdown

Summary

This PR introduces native support for Google Cloud Spanner using the GoogleSQL dialect across the Flowable engine suite.

Key Changes

  1. Cloud Spanner JDBC Driver & Profile:
    • Introduced com.google.cloud:google-cloud-spanner-jdbc:2.27.0 in flowable-dependencies.
    • Added -Pspanner profile in flowable-parent.
  2. Dialect & Database Type Resolution:
    • Added DATABASE_TYPE_SPANNER = "spanner" in DbUtil and AbstractEngineConfiguration.
    • Added Spanner SQL properties (spanner.properties) and configured NULLS FIRST / NULLS LAST order-by formatting in ListQueryParameterObject.
    • Configured Spanner schema metadata filtering in TableDataManagerImpl and AbstractSqlScriptBasedDbSchemaManager.
  3. Transaction Abort Retries & Primary Keys:
    • Implemented SpannerRetryInterceptor for transparent exponential backoff on Spanner transaction aborts (gRPC code 10 ABORTED).
    • Defaulted entity ID generator on Spanner to StrongUuidGenerator to prevent root-split write hotspotting (GSQL-C1).
  4. GoogleSQL MyBatis Mapper Compatibility:
    • Adjusted 11 bulk delete MyBatis XML mappers (HistoricDetail, HistoricActivityInstance, HistoricVariableInstance, HistoricTaskLogEntry, etc.) to omit aliases between DELETE and FROM.
  5. GoogleSQL DDL Scripts:
    • Authored complete GoogleSQL schema creation and teardown scripts for Common, Process Engine, History, IDM, CMMN, DMN, App, Event Registry, and the unified distribution script (distro/sql/create/all/flowable.spanner.all.create.sql).
    • Structured drop scripts in strict reverse dependency order: Foreign Keys -> Secondary Indexes -> Tables.
  6. Testing & CI Harness:
    • Added flowable.spanner.cfg.xml and SpannerEngineIntegrationTest in flowable-engine.
    • Added GitHub Actions workflow .github/workflows/spanner.yml running against Cloud Spanner Emulator.

Compatibility

  • Preserves 100% backward compatibility with existing databases (H2, MySQL, PostgreSQL, Oracle, DB2, etc.).
  • Default build and test execution remain untouched.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant