db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3878) Replication: stopSlave does not close serversocket when master has crashed.
Date Fri, 24 Oct 2008 10:01:44 GMT

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

Knut Anders Hatlen updated DERBY-3878:

    Fix Version/s:

Committed d3878-with-comments.diff to trunk with revision 707591.

I haven't written regression tests for this bug (haven't learnt how to use the replication
test framework yet). Will file a new issue for adding regression tests before I close this

I'm leaving the issue open until the fix has been back-ported to the 10.4 branch.

> Replication: stopSlave does not close serversocket when master has crashed.
> ---------------------------------------------------------------------------
>                 Key: DERBY-3878
>                 URL: https://issues.apache.org/jira/browse/DERBY-3878
>             Project: Derby
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions:
>            Reporter: Jørgen Løland
>            Assignee: Knut Anders Hatlen
>             Fix For:
>         Attachments: d3878-suggested-fix.diff, d3878-with-comments.diff
> The stopSlave command (connection URL attribute) fails to close the ServerSocket when
called after master database has crashed. Because of this, the same Derby instance cannot
later start a slave on the same port. 
> The problem is in ReplicationMessageReceive#tearDown and SocketConnection#tearDown:
> SC#tearDown:
> When objOutputStream is closed, the stream's flush method is called. Flush throws an
exception, and socket.close is not called.
> RMR#tearDown:
> When socketCon.teardown throws an exception, serverSocket.close is not called.
> Suggested fix: add try/catch/finally blocks so that vital code (socket.close and serverSocket.close)
is always called.
> Note that the stop slave command can also come from the master (if stopMaster connection
URL is called), in which case this bug will not materialize.

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

View raw message