-
Notifications
You must be signed in to change notification settings - Fork 24
Add transaction isolation. #69
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
Add transaction isolation. #69
Conversation
|
Hello, |
5cc1a99 to
b5e131b
Compare
|
Hi Sylvain, Done, I tested it successfully at work today. |
|
|
||
| public class LogRepositoryConstants { | ||
|
|
||
| public static final String TRANSACTION_ISOLATION_COLUMN = "TRANSACTION_ISOLATION"; |
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.
please keep the alphabetical sorting
| final Integer transactionIsolation = (Integer) dataModel.getValueAt(modelRowIndex, columnModelIndex); | ||
| if (transactionIsolation != null ) { | ||
| switch (transactionIsolation) { | ||
| case 1: |
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.
please use constants in java.sql.Connection instead of numeric values
| switch (transactionIsolation) { | ||
| case 1: | ||
| component.setText("RU"); | ||
| component.setToolTipText("Read Uncommitted"); |
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.
I suggest to add the constant number in parentheses so that if one wants to apply a filter the value to use will be easily visible.
e.g "Read Uncommitted (1)"
|
|
||
| final StatementLog log = new StatementLog(connectionInfo.getUuid(), randomUUID(), System.currentTimeMillis(), | ||
| StatementType.BASE_NON_PREPARED_STMT, "myrawsql", Thread.currentThread().getName(), 123, true); | ||
| StatementType.BASE_NON_PREPARED_STMT, "myrawsql", Thread.currentThread().getName(), 123, true, 0); |
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.
0 -> java.sql.Connection.TRANSACTION_NONE
| final List<String> sqlList = Arrays.asList("st1", "st2", "st3"); | ||
| final BatchedPreparedStatementsLog batchedLogs = new BatchedPreparedStatementsLog(log.getConnectionUuid(), | ||
| randomUUID(), System.currentTimeMillis(), "myRaw stmt", sqlList, "myThread", 13, true); | ||
| randomUUID(), System.currentTimeMillis(), "myRaw stmt", sqlList, "myThread", 13, true, 1); |
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.
idem, 1 -> ...
b5e131b to
c624958
Compare
c624958 to
6277bd6
Compare
|
Hello Sylvain, all small fixes pushed. Sorry for the response time, other stuff to do... |
|
thanks, merged to master.
Released version 0.9.0 with it
… On 29 May 2018, at 17:48, millgi ***@***.***> wrote:
Hello Sylvain, all small fixes pushed. Sorry for the response time, other stuff to do...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#69 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAr2Iqs3xLPPEU-1CEgnXNzBD4J43rERks5t3W3pgaJpZM4ThM8V>.
|
Hello,
I added a column on statements showing the transaction isolation. It helped us to investigate the reason of some dead locks in our programs.