Derby
  1. Derby
  2. DERBY-3890

Replication: NPE for startSlave of encrypted database

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3, 10.4.2.0
    • Fix Version/s: 10.5.1.1
    • Component/s: Replication
    • Labels:
      None

      Description

      If slave replication mode is started on an encrypted database, derby fails with a NPE and then hangs. The reason for the hang is that LogToFile#initializeSlaveReplicationMode needs to scan the log to find the end. For encrypted databases, this scan uses RawStoreFactory#decrypt. At this stage, LTF#rawStoreFactory variable has not been set.

      A solution may be to set this variable in LTF before scanning the log.

      1. derby-3890-1.stat
        0.3 kB
        Jørgen Løland
      2. derby-3890-1.diff
        6 kB
        Jørgen Løland

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          Closing issue.

          Show
          Kristian Waagan added a comment - Closing issue.
          Hide
          Jørgen Løland added a comment -

          Changing to type "improvement" since this fix enables replication of encrypted databases.

          Show
          Jørgen Løland added a comment - Changing to type "improvement" since this fix enables replication of encrypted databases.
          Hide
          Jørgen Løland added a comment -

          Thanks for reviewing the patch.

          derby-3890-1.diff committed with revision 708510.

          Show
          Jørgen Løland added a comment - Thanks for reviewing the patch. derby-3890-1.diff committed with revision 708510.
          Hide
          Knut Anders Hatlen added a comment -

          The patch looks correct to me. I've performed some manual tests and I haven't been able to break anything. +1 to commit.

          Show
          Knut Anders Hatlen added a comment - The patch looks correct to me. I've performed some manual tests and I haven't been able to break anything. +1 to commit.
          Hide
          Jørgen Løland added a comment -

          The attached patch removes the NPE by setting RawStoreFactory in LogFactory before starting slave replication mode. The patch removes the only currently known problem related to replication of encrypted databases.

          A separate jira has been created for testing replication of encrypted databases, so this patch does not include any test cases.

          Show
          Jørgen Løland added a comment - The attached patch removes the NPE by setting RawStoreFactory in LogFactory before starting slave replication mode. The patch removes the only currently known problem related to replication of encrypted databases. A separate jira has been created for testing replication of encrypted databases, so this patch does not include any test cases.

            People

            • Assignee:
              Jørgen Løland
              Reporter:
              Jørgen Løland
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development