db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lily Wei (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4314) With derby client setTransactionIsolation executes and commits even if isolation has not changed
Date Fri, 18 Sep 2009 03:13:57 GMT

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

Lily Wei commented on DERBY-4314:
---------------------------------

Thanks Kristian. I apply the patch. I don't know about your question to DRDA standard. 
I run it against the repro from DERBY-4343 TestConnReuser.java. I got the ASSERT failure with
defaultisolation change. This is my output from running TestConnReuse.java
$ java TestConnReuse
FirstConnection
count = 22
Seccond Connection. Reuse Connection
Third Connection. Set same isolation
Exception in thread "main" org.apache.derby.shared.common.sanity.AssertFailure:
ASSERT FAILED
        at org.apache.derby.shared.common.sanity.SanityManager.ASSERT(SanityMana
ger.java:98)
        at org.apache.derby.client.am.Connection.setTransactionIsolationX(Connec
tion.java:987)
        at org.apache.derby.client.am.Connection.setTransactionIsolation(Connect
ion.java:915)
        at org.apache.derby.client.am.LogicalConnection.setTransactionIsolation(
LogicalConnection.java:253)
        at TestConnReuse.main(TestConnReuse.java:33)
---------------
Stack traces for all live threads:
Thread name=Finalizer id=3 priority=8 state=WAITING isdaemon=true
        java.lang.Object.wait(Native Method)
        java.lang.ref.ReferenceQueue.remove(Unknown Source)
        java.lang.ref.ReferenceQueue.remove(Unknown Source)
        java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Thread name=main id=1 priority=5 state=RUNNABLE isdaemon=false
        java.lang.Thread.dumpThreads(Native Method)
        java.lang.Thread.getAllStackTraces(Unknown Source)
        org.apache.derby.shared.common.sanity.ThreadDump.getStackDumpString(Thre
adDump.java:34)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        java.lang.reflect.Method.invoke(Unknown Source)
        org.apache.derby.shared.common.sanity.AssertFailure$1.run(AssertFailure.
java:165)

Do you think I am missing something?

> 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-2.diff, DERBY-4314-3.diff, DERBY-4314-5.diff, derby-4314-6a-initial_piggybacking.diff,
derby-4314-6a-initial_piggybacking.stat, 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