db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4314) With derby client setTransactionIsolation executes and commits even if isolation has not changed
Date Sat, 18 Jul 2009 22:00:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732939#action_12732939
] 

Kathey Marsden commented on DERBY-4314:
---------------------------------------

Thanks Lily for looking at this issue.   Here are some comments.

- I think it would be good to put the check after the trace call so the call will still get
logged if tracing is on.
- In the test, I guess  we can just remove the whole switch statment passCommitCheck etc.
and   just have.
assertEquals(1,count);  since the behavior is the same for the drivers.  The comment in the
beginning of the test is no longer relevant and maybe the fixture name should be changed to
testSetTransactionIsolationDoesNotCommit() or some such.
- I guess there was already an issue for this DERBY-2064 which should be duped to this one,
since you are posting your work here.
- I think  calling getTransactionIsolation()  will introduce another server round trip to
get the isolation if it is not cached.  Under what circumstances will the isolation be cached
or not cached? Is this a performance issue or does it happen rarely?
- Also calling getTransactionIsolation() directly will cause the getTransactionIsolation call
to get traced which it probably shouldn't.   We might need to make a getTransactionIsolationX()
which does the work but doesn't have the tracing call.  and then have the X method  called
by getTransasctionIsolation() and setTransactionIsolation()


> With derby client setTransactionIsolation executes and commits even if isolation has
not changed 
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4314
>                 URL: https://issues.apache.org/jira/browse/DERBY-4314
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC, Network Client
>    Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1, 10.6.0.0
>            Reporter: Kathey Marsden
>            Priority: Minor
>         Attachments: DERBY-4314.diff
>
>
> With in EmbedConnection.setIsolation() we have a check to see if the isolation level
is the same and if so just return without doing a commit:
>   public void setTransactionIsolation(int level) throws SQLException {
> 		if (level == getTransactionIsolation())
> 			return;
> with org.apache.derby.client.am.Connection we have no such check. It would be good if
the client driver acted like embedded.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message