Derby
  1. Derby
  2. DERBY-4980

Replication tests lose derby.log for slave

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.6.1.0, 10.6.2.1, 10.7.1.1
    • Fix Version/s: 10.8.1.2
    • Component/s: Test
    • Labels:
      None
    • Bug behavior facts:
      Regression

      Description

      After running ReplicationRun_Local_3_p1 I notice that of the two directories created, db_master and db_slave, only db_master contains a derby.log file. This is not so nice, since the log file is sometimes needed for test debugging

      1. derby-4980-1.diff
        0.8 kB
        Dag H. Wanvik

        Activity

        Hide
        Dag H. Wanvik added a comment -

        Uploading a preliminary patch that seems to fix this problem, derby-4980-1. The error is that
        when starting the Derby server for the slave, the same path name is used for the server's working directory as for the master server ("db_master"). This means that the slave server can't open derby.log for writing since it's already opened by the master server. (Does this fact get logged to the console?)

        The patch sets the working directory for the slave correctly to the "db_slave" directory.

        SInce the fix is done in the replication test ReplicationRun superclass, other replication tests suffer from the same problem.

        Show
        Dag H. Wanvik added a comment - Uploading a preliminary patch that seems to fix this problem, derby-4980-1. The error is that when starting the Derby server for the slave, the same path name is used for the server's working directory as for the master server ("db_master"). This means that the slave server can't open derby.log for writing since it's already opened by the master server. (Does this fact get logged to the console?) The patch sets the working directory for the slave correctly to the "db_slave" directory. SInce the fix is done in the replication test ReplicationRun superclass, other replication tests suffer from the same problem.
        Hide
        Dag H. Wanvik added a comment - - edited

        The behavior was introduced by DERBY-4417 (since 10.6), revision 894607.

        Show
        Dag H. Wanvik added a comment - - edited The behavior was introduced by DERBY-4417 (since 10.6), revision 894607.
        Hide
        Dag H. Wanvik added a comment -

        ReplicationSuite ran ok with the patch.

        Show
        Dag H. Wanvik added a comment - ReplicationSuite ran ok with the patch.
        Hide
        Dag H. Wanvik added a comment -

        Just to answer my own question, "Does this fact get logged to the console?":

        derby.log is being opened with "-Dderby.infolog.append=true" so that means the contents of both servers logs go to the same derby.log file. Without this option, I still see no error on the console when I start two servers with the same current directory, but stuff would likely be lost.

        Show
        Dag H. Wanvik added a comment - Just to answer my own question, "Does this fact get logged to the console?": derby.log is being opened with "-Dderby.infolog.append=true" so that means the contents of both servers logs go to the same derby.log file. Without this option, I still see no error on the console when I start two servers with the same current directory, but stuff would likely be lost.
        Hide
        Dag H. Wanvik added a comment -

        Committed fix as svn 1067366, closing.

        Show
        Dag H. Wanvik added a comment - Committed fix as svn 1067366, closing.

          People

          • Assignee:
            Dag H. Wanvik
            Reporter:
            Dag H. Wanvik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development