-
Notifications
You must be signed in to change notification settings - Fork 34
[PLUGIN-1779] Add TRANSACTION_ISOLATION_LEVEL config in MySQL, PostgreSQL & SQL Server plugins #583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -84,6 +84,20 @@ | |||
"label": "Password", | ||||
"name": "password" | ||||
}, | ||||
{ | ||||
"widget-type": "select", | ||||
"label": "Transaction Isolation Level", | ||||
"name": "transactionIsolationLevel", | ||||
"widget-attributes": { | ||||
"values": [ | ||||
ritwiksahani marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
"TRANSACTION_READ_UNCOMMITTED", | ||||
"TRANSACTION_READ_COMMITTED", | ||||
"TRANSACTION_REPEATABLE_READ", | ||||
"TRANSACTION_SERIALIZABLE" | ||||
], | ||||
"default": "TRANSACTION_SERIALIZABLE" | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change this to read commited as the default value as mentioned in the documentation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated 38bd277 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ritwiksahani @itsankit-google Should we keep the default type as Serializable, which is currently used for all plugins, or should we change it to match the default isolation level supported by the database? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is Serializable used for all plugins? I don't think so, correct me if I am wrong but we don't set transaction isolation level for other plugins currently. In that case it would be using the default isolation level of the DB. We should maintain backward compatibility in terms of behaviour and have the defauilt isolation level match the DB one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, we were setting database-plugins/database-commons/src/main/java/io/cdap/plugin/db/TransactionIsolationLevel.java Line 66 in cde7167
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, agreed then in that case we should keep SERIALIZABLE as default and not change the behaviour. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed the default value to |
||||
} | ||||
}, | ||||
{ | ||||
"widget-type": "keyvalue", | ||||
"label": "Connection Arguments", | ||||
|
@@ -316,6 +330,10 @@ | |||
{ | ||||
"type": "property", | ||||
"name": "connectionArguments" | ||||
}, | ||||
{ | ||||
"type": "property", | ||||
"name": "transactionIsolationLevel" | ||||
} | ||||
] | ||||
}, | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this class also used by
SQLServer
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. Should we hide the property from
SQLServer
Plugins for now? ORadd this property to the respective connector configuration classes of
PostgreSQL
andMySQL
plugins and remove from parent connector config?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not implement it in SQLServer as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added here