Add isolation level support to relational block
Add Isolation Level Support to Relational Block in Legend Engine
This PR adds support for transaction isolation levels in relational blocks by:
- Creating a new enum
TransactionIsolationLevelthat maps to the standard JDBC isolation levels - Adding an
isolationLevelproperty toRelationalBlockExecutionNode - Updating
RelationalExecutionNodeExecutorto set the isolation level on connections - Adding a method to
BlockConnectionContextto set the isolation level on all connections
The isolation levels supported are:
- NONE (Connection.TRANSACTION_NONE)
- READ_UNCOMMITTED (Connection.TRANSACTION_READ_UNCOMMITTED)
- READ_COMMITTED (Connection.TRANSACTION_READ_COMMITTED)
- REPEATABLE_READ (Connection.TRANSACTION_REPEATABLE_READ)
- SERIALIZABLE (Connection.TRANSACTION_SERIALIZABLE)
Pure Metamodel Changes
In addition to the Java implementation, this PR also adds isolation level support to the Pure metamodel in the vX_X_X protocol version:
- Created a new
TransactionIsolationLevelenum in the Pure metamodel - Added an
isolationLevelproperty to theRelationalBlockExecutionNodeclass in the Pure metamodel - Updated the transformation function to handle the new property
These changes ensure that isolation levels can be properly represented in the Pure model and correctly transformed to the protocol model.
This implementation ensures backward compatibility by making the isolation level property optional. Existing code that doesn't specify an isolation level will continue to work with the default isolation level of the database.
Link to Devin run
https://app.devin.ai/sessions/e79a769f53b54ed8976bc6696ceb2638
Requested by
- :x: - login: @devin-ai-integration[bot] . The commit (1624291d84eb29707c672626486b0f9c7f5e1738, 9c677ff8736d94ea3860cc046295b13b0ce3d6b6) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
Workflow Telemetry - Build CI / Build
Workflow telemetry for commit 1624291d84eb29707c672626486b0f9c7f5e1738 You can access workflow job details here
Step Trace
gantt
title Build
dateFormat x
axisFormat %H:%M:%S
Set up job : milestone, 1741709482000, 1741709484000
Checkout repo : 1741709484000, 1741709488000
Cache Maven dependencies : 1741709488000, 1741709512000
Set up JDK : 1741709512000, 1741709527000
Check Java version : 1741709527000, 1741709527000
Configure git : 1741709527000, 1741709527000
Download deps and plugins : 1741709527000, 1741709549000
Collect Workflow Telemetry : 1741709549000, 1741709550000
Build (PR) : 1741709550000, 1741710439000
Build (with Maven Deploy + Docker Snapshot) : done, 1741710439000, 1741710439000
Test : done, 1741710439000, 1741710439000
Test SDT Postgres : done, 1741710439000, 1741710439000
Test SDT DuckDB : done, 1741710439000, 1741710439000
Generate PCT Report : done, 1741710439000, 1741710439000
Upload PCT HTML Report : done, 1741710439000, 1741710439000
CPU Metrics
Memory Metrics
IO Metrics
| Read | Write | |
|---|---|---|
| Network I/O | ||
| Disk I/O |
Workflow Telemetry - Build CI / Build
Workflow telemetry for commit 9c677ff8736d94ea3860cc046295b13b0ce3d6b6 You can access workflow job details here
Step Trace
gantt
title Build
dateFormat x
axisFormat %H:%M:%S
Set up job : milestone, 1741710452000, 1741710454000
Checkout repo : 1741710454000, 1741710458000
Cache Maven dependencies : 1741710458000, 1741710480000
Set up JDK : 1741710480000, 1741710497000
Check Java version : 1741710497000, 1741710498000
Configure git : 1741710498000, 1741710498000
Download deps and plugins : 1741710498000, 1741710522000
Collect Workflow Telemetry : 1741710522000, 1741710522000
Build (PR) : crit, 1741710522000, 1741711584000
Build (with Maven Deploy + Docker Snapshot) : done, 1741711584000, 1741711584000
Test : done, 1741711584000, 1741711584000
Test SDT Postgres : done, 1741711584000, 1741711584000
Test SDT DuckDB : done, 1741711584000, 1741711584000
Generate PCT Report : done, 1741711584000, 1741711584000
Upload PCT HTML Report : done, 1741711584000, 1741711584000
CPU Metrics
Memory Metrics
IO Metrics
| Read | Write | |
|---|---|---|
| Network I/O | ||
| Disk I/O |
Test Results
0 files - 2 0 suites - 2 0s :stopwatch: -22s 0 tests - 122 0 :heavy_check_mark: - 122 0 :zzz: ±0 0 :x: ±0 0 runs - 244 0 :heavy_check_mark: - 244 0 :zzz: ±0 0 :x: ±0
Results for commit 9c677ff8. ± Comparison against base commit 3a9fdf2b.
This pull request removes 122 tests.
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - abs(0/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - abs(1/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - abs(2/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - abs(3/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - acos(0/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - acos(1/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - acos(2/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - acos(3/3)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - ascii(0/4)
org.finos.legend.engine.relational.test.sdt.SdtTestSuiteBuilder$SDTTestCase ‑ FuncTests - ascii(1/4)
…
This PR is stale because it has been open for 30 days with no activity. Please remove stale label or add any comment to keep this open. Otherwise this will be closed in 5 days.
This PR was closed because it has been inactive for 35 days. Please re-open if this PR is still relevant.