felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie goodyear (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (FELIX-2280) To much code duplication in DefaultJDBCLock, OracleJDBCLock and MySQLJDBCLock
Date Mon, 10 May 2010 19:22:31 GMT

    [ https://issues.apache.org/jira/browse/FELIX-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865851#action_12865851
] 

Jamie goodyear edited comment on FELIX-2280 at 5/10/10 3:21 PM:
----------------------------------------------------------------

Hi Christian,

In my testing I came across an issue restoring service after a DB failure. The test case can
be reproduced as follows:

1. Start up DB.
2. Start first instance of Karaf, configured to DB. This should become the Master.
3. Start second instance of Karaf, also configured to DB. This should become a Slave.
4. Stop the DB.
5. Observe that both instances of Karaf are hung waiting for DB lock.
6. Start the DB again.
7. Observe that both instances of Karaf are still hung.

One of these instances should have become the Master upon return of the DB service. I reproduced
this using the Oracle JDBC Lock.

Cheers,
Jamie

Note: The same behavior is observed while using the Default JDBC Lock as well (Derby).

      was (Author: jgoodyear):
    Hi Christian,

In my testing I came across an issue restoring service after a DB failure. The test case can
be reproduced as follows:

1. Start up DB.
2. Start first instance of Karaf, configured to DB. This should become the Master.
3. Start second instance of Karaf, also configured to DB. This should become a Slave.
4. Stop the DB.
5. Observe that both instances of Karaf are hung waiting for DB lock.
6. Start the DB again.
7. Observe that both instances of Karaf are still hung.

One of these instances should have become the Master upon return of the DB service. I reproduced
this using the Oracle JDBC Lock.

Cheers,
Jamie
  
> To much code duplication in DefaultJDBCLock, OracleJDBCLock and MySQLJDBCLock
> -----------------------------------------------------------------------------
>
>                 Key: FELIX-2280
>                 URL: https://issues.apache.org/jira/browse/FELIX-2280
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>    Affects Versions: karaf-1.4.0
>         Environment: All
>            Reporter: Christian Müller
>            Assignee: Jamie goodyear
>         Attachments: FELIX-2280.patch, FELIX-2280.patch, FELIX-2280.patch, FELIX-2280.patch
>
>
> org.apache.felix.karaf.main.DefaultJDBCLock, org.apache.felix.karaf.main.MySQLJDBCLock
and org.apache.felix.karaf.main.OracleJDBCLock has to much code duplications. I propose a
solution like in ActiveMQ [package org.apache.activemq.store.jdbc.adapter|http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/].
> And we should implement some unit tests for it.
> If it's fine for you, I will try to improve this part of karaf and provide a patch for
it.

-- 
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