db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland (JIRA) <j...@apache.org>
Subject [jira] Updated: (DERBY-3508) Log receiver thread fails with NPE at failover when master has died
Date Wed, 12 Mar 2008 08:34:46 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jørgen Løland updated DERBY-3508:

    Attachment: derby-3508-1a.diff

The NPE was caused by the log receiver thread trying to get the port from a closed down ReplicationMessageReceive.
Patch v1 fixes the problem. 

I don't know how to write a regression test for this bug since the exception is not thrown
to the caller of failover and the command succeeds.

All tests (except failures reported in tinderbox) passed, including the replication suite.
Requesting review.

> Log receiver thread fails with NPE at failover when master has died
> -------------------------------------------------------------------
>                 Key: DERBY-3508
>                 URL: https://issues.apache.org/jira/browse/DERBY-3508
>             Project: Derby
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions:
>            Reporter: Øystein Grøvlen
>            Assignee: Jørgen Løland
>            Priority: Minor
>         Attachments: derby-3508-1a.diff, derby-3508-1a.stat
> Both master and slave embedded in ij.
> I kill master and perform failover on slave. 
> The following is printed in ij:
> ij> connect 'jdbc:derby:slaveDB;user=oystein;password=pass;failover=true';
> Exception in thread "derby.slave.logger-slaveDB" java.lang.NullPointerException
>     at org.apache.derby.impl.services.replication.slave.SlaveController.setupConnection(SlaveController.java:348)
>    at org.apache.derby.impl.services.replication.slave.SlaveController.handleDisconnect(SlaveController.java:375)
>   at org.apache.derby.impl.services.replication.slave.SlaveController.access$600(SlaveController.java:62)
>  at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:504)
> Note that failover works, and all seems well, so this is not a major issue.
> derby.log is as follows:
> Lost connection with the replication master of database 'slaveDB'.
> java.io.EOFException
> 	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2552)
> 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
> 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> 	at org.apache.derby.impl.services.replication.net.SocketConnection.readMessage(SocketConnection.java:84)
> 	at org.apache.derby.impl.services.replication.net.ReplicationMessageReceive.readMessage(ReplicationMessageReceive.java:387)
> 	at org.apache.derby.impl.services.replication.slave.SlaveController$SlaveLogReceiverThread.run(SlaveController.java:477)
> ---------  END REPLICATION ERROR MESSAGE ----------
> Failover perfomed successfully for database 'slaveDB'.
> Database Class Loader started - derby.database.classpath=''

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

View raw message