[🍒] Add TRANSACTION_ISOLATION_LEVEL config in cloudsql-postgres and cloudsql-mysql plugins for 1.11#677
Conversation
…sql-mysql plugins for develop fix: updated widget and docs fix: typos Added a constant for default isolation level
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for configuring the transaction isolation level in CloudSQL MySQL and CloudSQL PostgreSQL plugins, updating documentation, widget configurations, and source configurations. The review feedback highlights that both CloudSQLMySQLSource and CloudSQLPostgreSQLSource should honor the transaction isolation level configured in the connection when useConnection is enabled, rather than falling back to the local source configuration or default value.
| @Override | ||
| public String getTransactionIsolationLevel() { | ||
| return transactionIsolationLevel != null ? transactionIsolationLevel : DEFAULT_TRANSACTION_ISOLATION_LEVEL; | ||
| } |
There was a problem hiding this comment.
When useConnection is enabled, the source should honor the transaction isolation level configured in the connection rather than falling back to the source's local configuration or default value. Currently, connection.getTransactionIsolationLevel() is ignored.
@Override
public String getTransactionIsolationLevel() {
if (useConnection != null && useConnection && connection != null) {
return connection.getTransactionIsolationLevel();
}
return transactionIsolationLevel != null ? transactionIsolationLevel : DEFAULT_TRANSACTION_ISOLATION_LEVEL;
}| @Override | ||
| public String getTransactionIsolationLevel() { | ||
| return transactionIsolationLevel != null ? transactionIsolationLevel : DEFAULT_TRANSACTION_ISOLATION_LEVEL; | ||
| } |
There was a problem hiding this comment.
When useConnection is enabled, the source should honor the transaction isolation level configured in the connection rather than falling back to the source's local configuration or default value. Currently, connection.getTransactionIsolationLevel() is ignored.
@Override
public String getTransactionIsolationLevel() {
if (useConnection != null && useConnection && connection != null) {
return connection.getTransactionIsolationLevel();
}
return transactionIsolationLevel != null ? transactionIsolationLevel : DEFAULT_TRANSACTION_ISOLATION_LEVEL;
}
[🍒]
🍒 [cherrypick]
PR : (#675)
Description:
Add TRANSACTION_ISOLATION_LEVEL config in cloudsql-postgres and cloudsql-mysql plugins