Skip to content

Add TRANSACTION_ISOLATION_LEVEL config in cloudsql-postgres and cloudsql-mysql plugins#672

Draft
vedanshugarg04 wants to merge 1 commit into
data-integrations:release/1.12from
cloudsufi:transaction-isolation-level
Draft

Add TRANSACTION_ISOLATION_LEVEL config in cloudsql-postgres and cloudsql-mysql plugins#672
vedanshugarg04 wants to merge 1 commit into
data-integrations:release/1.12from
cloudsufi:transaction-isolation-level

Conversation

@vedanshugarg04

Copy link
Copy Markdown

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +87 to +100
{
"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"
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines +87 to +99
{
"widget-type": "select",
"label": "Transaction Isolation Level",
"name": "transactionIsolationLevel",
"widget-attributes": {
"values": [
"TRANSACTION_REPEATABLE_READ",
"TRANSACTION_SERIALIZABLE",
"TRANSACTION_READ_COMMITTED"
],
"default": "TRANSACTION_READ_COMMITTED"
}
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines +155 to +158
@Name(TRANSACTION_ISOLATION_LEVEL)
@Description("Transaction isolation level for queries run by this source.")
@Nullable
public String transactionIsolationLevel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
@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;

Comment on lines +45 to +49
**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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.

Suggested change
**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.

Comment on lines +55 to +59
**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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.

Suggested change
**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.

Comment on lines +30 to +34
**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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Fix the typo "databse" -> "database" and add a missing space before the backtick in to and TRANSACTION_READ_COMMITTED.

Suggested change
**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.

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