Add TRANSACTION_ISOLATION_LEVEL config in cloudsql-postgres and cloudsql-mysql plugins#672
Conversation
…sql-mysql plugins
There was a problem hiding this comment.
Code Review
This pull request introduces the 'Transaction Isolation Level' configuration option across CloudSQL MySQL and PostgreSQL plugins, including their sources, sinks, connectors, and documentation. The review feedback highlights critical UI configuration conflicts due to duplicate property definitions in the batch sink widget JSON files. Additionally, it is recommended to change the visibility of the new configuration field in CloudSQLMySQLSource.java to private for consistency, and to correct minor typos and formatting issues in the PostgreSQL documentation files.
| { | ||
| "widget-type": "select", | ||
| "label": "Transaction Isolation Level", | ||
| "name": "transactionIsolationLevel", | ||
| "widget-attributes": { | ||
| "values": [ | ||
| "TRANSACTION_READ_UNCOMMITTED", | ||
| "TRANSACTION_READ_COMMITTED", | ||
| "TRANSACTION_SERIALIZABLE", | ||
| "TRANSACTION_REPEATABLE_READ" | ||
| ], | ||
| "default": "TRANSACTION_REPEATABLE_READ" | ||
| } | ||
| }, |
There was a problem hiding this comment.
The transactionIsolationLevel property is already defined in the Advanced group (lines 171-183). Defining it twice in the same widget JSON file will cause UI rendering conflicts and unexpected behavior. Please remove this duplicate definition from the Connection group, or if you intend to move it, ensure you also remove the definition from the Advanced group.
| { | ||
| "widget-type": "select", | ||
| "label": "Transaction Isolation Level", | ||
| "name": "transactionIsolationLevel", | ||
| "widget-attributes": { | ||
| "values": [ | ||
| "TRANSACTION_REPEATABLE_READ", | ||
| "TRANSACTION_SERIALIZABLE", | ||
| "TRANSACTION_READ_COMMITTED" | ||
| ], | ||
| "default": "TRANSACTION_READ_COMMITTED" | ||
| } | ||
| }, |
There was a problem hiding this comment.
The transactionIsolationLevel property is already defined in the Advanced group (lines 186-198). Defining it twice in the same widget JSON file will cause UI rendering conflicts and unexpected behavior. Please remove this duplicate definition from the Connection group, or if you intend to move it, ensure you also remove the definition from the Advanced group.
| @Name(TRANSACTION_ISOLATION_LEVEL) | ||
| @Description("Transaction isolation level for queries run by this source.") | ||
| @Nullable | ||
| public String transactionIsolationLevel; |
There was a problem hiding this comment.
For consistency with other configuration properties in this class (such as useConnection and connection) and with CloudSQLPostgreSQLSourceConfig, the transactionIsolationLevel field should be declared as private instead of public.
| @Name(TRANSACTION_ISOLATION_LEVEL) | |
| @Description("Transaction isolation level for queries run by this source.") | |
| @Nullable | |
| public String transactionIsolationLevel; | |
| @Name(TRANSACTION_ISOLATION_LEVEL) | |
| @Description("Transaction isolation level for queries run by this source.") | |
| @Nullable | |
| private String transactionIsolationLevel; |
| **Transaction Isolation Level** The transaction isolation level of the databse connection | ||
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | ||
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | ||
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | ||
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
There was a problem hiding this comment.
Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.
| **Transaction Isolation Level** The transaction isolation level of the databse connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. | |
| **Transaction Isolation Level** The transaction isolation level of the database connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to `TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
| **Transaction Isolation Level** The transaction isolation level of the databse connection | ||
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | ||
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | ||
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | ||
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
There was a problem hiding this comment.
Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.
| **Transaction Isolation Level** The transaction isolation level of the databse connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. | |
| **Transaction Isolation Level** The transaction isolation level of the database connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to `TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
| **Transaction Isolation Level** The transaction isolation level of the databse connection | ||
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | ||
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | ||
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | ||
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
There was a problem hiding this comment.
Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.
| **Transaction Isolation Level** The transaction isolation level of the databse connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to`TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. | |
| **Transaction Isolation Level** The transaction isolation level of the database connection | |
| - TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible. | |
| - TRANSACTION_SERIALIZABLE: No dirty reads. Non-repeatable and phantom reads are prevented. | |
| - TRANSACTION_REPEATABLE_READ: No dirty reads. Prevents non-repeatable reads, but phantom reads are still possible. | |
| - Note: PostgreSQL does not implement `TRANSACTION_READ_UNCOMMITTED` as a distinct isolation level. Instead, this mode behaves identically to `TRANSACTION_READ_COMMITTED`, which is why it is not exposed as a separate option. |
No description provided.