You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2008/01/09 14:15:34 UTC

[jira] Created: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Broken synchronization for event handling in ClientPooledConnection40
---------------------------------------------------------------------

                 Key: DERBY-3308
                 URL: https://issues.apache.org/jira/browse/DERBY-3308
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.3.2.1, 10.2.2.0, 10.4.0.0
            Reporter: Kristian Waagan
            Assignee: Kristian Waagan
            Priority: Minor


Access to the the list of event listeners is not synchronized properly.

Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Resolved: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan resolved DERBY-3308.
------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

Committed 'derby-3308-1a-eventlisteners_synchronization.diff' to trunk with revision 614536.

I don't expect there will be more work on this issue, will close in a few days.

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff, derby-3308-1b-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Updated: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3308:
-----------------------------------

    Attachment: derby-3308-1a-eventlisteners_synchronization.diff

'derby-3308-1a-eventlisteners_synchronization.diff' synchronizes all methods accessing the list (a java.util.Vector) of statement event listeners.

I ran derbyall/suites.All without errors. Patch ready for review.

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Updated: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3308:
-----------------------------------

    Fix Version/s: 10.3.2.2
                   10.2.2.1

Backported the fix (revision 614536):
10.2 -> revision 618639
10.3 -> revision 618640

I ran all tests for both branches without errors, and both merges were clean.
Updated the fix versions accordingly.

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.2.2.1, 10.3.2.2, 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff, derby-3308-1b-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Commented: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561670#action_12561670 ] 

Knut Anders Hatlen commented on DERBY-3308:
-------------------------------------------

The patch looks fine to me.

Since the list is now guarded by synchronization on the pooled connection, couldn't it be changed from Vector to ArrayList? (Should be safe to do with listeners_ in the parent class as well.)

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Updated: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3308:
-----------------------------------

    Attachment: derby-3308-1b-eventlisteners_synchronization.diff

Thanks for commenting on the patch Knut Anders.

I have incorporated you suggestion about replacing Vector with ArrayList in revision 1b.

Regarding the suggested changes in the parent class, there are some methods that are synchronized and some that are not. A patch could be attached to the subtask of this issue. Feel free to add it, or maybe I will if I get around to it.

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff, derby-3308-1b-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Updated: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3308:
-----------------------------------

    Component/s: Network Client

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Updated: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3308:
-----------------------------------

       Derby Info: [Patch Available]
    Fix Version/s: 10.4.0.0

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Issue Comment Edited: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561688#action_12561688 ] 

kristwaa edited comment on DERBY-3308 at 1/24/08 2:02 AM:
-----------------------------------------------------------------

Committed 'derby-3308-1b-eventlisteners_synchronization.diff' to trunk with revision 614536.

I don't expect there will be more work on this issue, will close in a few days.

      was (Author: kristwaa):
    Committed 'derby-3308-1a-eventlisteners_synchronization.diff' to trunk with revision 614536.

I don't expect there will be more work on this issue, will close in a few days.
  
> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff, derby-3308-1b-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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


[jira] Closed: (DERBY-3308) Broken synchronization for event handling in ClientPooledConnection40

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan closed DERBY-3308.
----------------------------------


Haven't seen any problems with the patch in the regression tests. Closing issue.

> Broken synchronization for event handling in ClientPooledConnection40
> ---------------------------------------------------------------------
>
>                 Key: DERBY-3308
>                 URL: https://issues.apache.org/jira/browse/DERBY-3308
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Network Client
>    Affects Versions: 10.2.2.0, 10.3.2.1, 10.4.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.2.2.1, 10.3.2.2, 10.4.0.0
>
>         Attachments: derby-3308-1a-eventlisteners_synchronization.diff, derby-3308-1b-eventlisteners_synchronization.diff
>
>
> Access to the the list of event listeners is not synchronized properly.
> Taken the rather infrequent use of the relevant methods and the small critical sections, I mean it is sufficient to add synchronization to all the methods that access it at the method level. The same approach is taken in ClientPooledConnection (although not followed through consistently, some of the methods are unsynchronized).

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