Derby
  1. Derby
  2. DERBY-3921

Replication: Test replication of encrypted databases

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.5.3.0, 10.6.1.0
    • Component/s: Replication, Test
    • Labels:
      None

      Description

      It should be possible to replicate encrypted databases. Tests are needed to ensure that this works.

      1. DERBY-3921_diff.txt
        70 kB
        Ole Solberg
      2. DERBY-3921_diff-v5.txt
        77 kB
        Ole Solberg
      3. DERBY-3921_stat.txt
        1 kB
        Ole Solberg

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12444972 ] Default workflow, editable Closed status [ 12799002 ]
          Dag H. Wanvik made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Dag H. Wanvik made changes -
          Fix Version/s 10.5.2.1 [ 12314117 ]
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Hide
          Dag H. Wanvik added a comment -

          Backported to 10.5 branch as svn 799091, closing.

          Show
          Dag H. Wanvik added a comment - Backported to 10.5 branch as svn 799091, closing.
          Dag H. Wanvik made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Hide
          Dag H. Wanvik added a comment -

          Reopening to backport to 10.5 branch.

          Show
          Dag H. Wanvik added a comment - Reopening to backport to 10.5 branch.
          Ole Solberg made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Dag H. Wanvik made changes -
          Issue Type Test [ 6 ] Improvement [ 4 ]
          Ole Solberg made changes -
          Derby Info [Patch Available]
          Hide
          Rick Hillegas added a comment -

          Hi Ole: Sorry for not promptly reviewing your revised patch. I applied it and it seemed to me that the chunks which failed did not affect the point of the patch: adding a test for replication of encrypted databases. The regression test suite ran cleanly for me. I think this is a good increment. I have committed the revised patch at subversion revision 777105.

          Show
          Rick Hillegas added a comment - Hi Ole: Sorry for not promptly reviewing your revised patch. I applied it and it seemed to me that the chunks which failed did not affect the point of the patch: adding a test for replication of encrypted databases. The regression test suite ran cleanly for me. I think this is a good increment. I have committed the revised patch at subversion revision 777105.
          Hide
          Dag H. Wanvik added a comment -

          Tried to look at this patch, but it could no longer be applied..

          Show
          Dag H. Wanvik added a comment - Tried to look at this patch, but it could no longer be applied..
          Myrna van Lunteren made changes -
          Affects Version/s 10.5.1.1 [ 12313771 ]
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Hide
          Ole Solberg added a comment -

          Thanks for your review Rick.

          I have uploaded DERBY-3921_diff-v5.txt which should take care of your comments:

          • cleaned up setUp(), tearDown(),
          • added more header comments in test cases being part of this patch,
          • refactored 'URL = DB_PROTOCOL ....." code.

          I will add more header comments in other test cases as part of DERBY-4026.

          Reran tests.

          Thanks.

          Show
          Ole Solberg added a comment - Thanks for your review Rick. I have uploaded DERBY-3921 _diff-v5.txt which should take care of your comments: cleaned up setUp(), tearDown(), added more header comments in test cases being part of this patch, refactored 'URL = DB_PROTOCOL ....." code. I will add more header comments in other test cases as part of DERBY-4026 . Reran tests. Thanks.
          Ole Solberg made changes -
          Attachment DERBY-3921_diff-v5.txt [ 12401921 ]
          Hide
          Rick Hillegas added a comment -

          Thanks for the patch Ole. The replication suite ran cleanly for me after applying these changes. I have a couple small comments on the patch:

          Style: In a number of these tests, the setUp() and tearDown() overrides don't seem to do anything. I'd be inclined to remove these methods.

          Headers: I like the fact that some of the test cases have JIRA numbers embedded in their names. This helps connect the test cases with the issues. It would be even more helpful if the test cases had header comments which explained more about what was being tested.

          Factoring: I see a lot of instances of code like this, which I'd recommend abstracting into a shared method:

          + URL = DB_PROTOCOL
          + +"://"+masterServerHost
          + ":"+masterServerPort"/"
          + +masterDatabasePath+FS+masterDbSubPath+FS+replicatedDb
          + +useEncryption(false);

          Thanks.

          Show
          Rick Hillegas added a comment - Thanks for the patch Ole. The replication suite ran cleanly for me after applying these changes. I have a couple small comments on the patch: Style: In a number of these tests, the setUp() and tearDown() overrides don't seem to do anything. I'd be inclined to remove these methods. Headers: I like the fact that some of the test cases have JIRA numbers embedded in their names. This helps connect the test cases with the issues. It would be even more helpful if the test cases had header comments which explained more about what was being tested. Factoring: I see a lot of instances of code like this, which I'd recommend abstracting into a shared method: + URL = DB_PROTOCOL + +"://"+masterServerHost + ":"+masterServerPort "/" + +masterDatabasePath+FS+masterDbSubPath+FS+replicatedDb + +useEncryption(false); Thanks.
          Ole Solberg made changes -
          Component/s Test [ 11413 ]
          Affects Version/s 10.5.0.0 [ 12313010 ]
          Ole Solberg made changes -
          Derby Info [Patch Available]
          Ole Solberg made changes -
          Attachment DERBY-3921_stat.txt [ 12399823 ]
          Attachment DERBY-3921_diff.txt [ 12399824 ]
          Hide
          Ole Solberg added a comment -

          Attaching a patch for testing replication on encrypted databases.

          The patch also contains a couple of additional changes

          • cleanup of support mechanisms for replication and
          • a simple test for indexing in replicated databases.

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java

          • Adding support for running replication tests on encrypted databases. (DERBY-3921.)
            Adding a support method (makeReadyForReplication()) which handles all setup to run
            a test on a replicated database.
            Use of this has been only partially implemented (Only in the tests touched by this patch.)
            Will simplify more of the replicationtests to use this later on.
          • Adding support to run a simple (short time) replication load by default.
            To use the previous default load use '-Dderby.tests.replSimpleLoad'.

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3.java
          Adding support for running replication tests on encrypted databases. (DERBY-3921.)

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p4.java
          Adding support for running replication tests on encrypted databases. (DERBY-3921.)

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local.java
          testReplication_Local_existingTestsAsReplLoad() renamed to testReplication_Local_TestStraightReplication()

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p1.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p3.java
          Using param 'replicationTest=null' to NOT run any replication load.

          A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p5.java
          Test DERBY-3924 verifying the fix for DERBY-3878: test for restart of slave after master has crashed.

          A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p6.java
          Test for DERBY-3896: failure in LogicalUndoOperation.doMe() when starting slave with uncommitted
          transactions on the master.

          • testReplication_Local_3_p6_DERBY_3896() should be enabled when DERBY-3896 is fixed.

          A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_1Indexing.java
          Simple test to verify indexes are replicated.

          A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_Encrypted_1.java
          DERBY-3921: Testing replication of encrypted databases.

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part2.java
          Renaming some package internal methods.

          M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java
          Enabling new tests:

          • ReplicationRun_Local_Encrypted_1 - test for DERBY-3921 / test replication of encrypted db.,
          • ReplicationRun_Local_3_p5 - test for DERBY-3924 / replication: test for restart of slave after master has crashed,
          • ReplicationRun_Local_3_p6 - test for DERBY-3896 / replication: failure in LogicalUndoOperation.doMe()
            when starting slave with uncommitted transactions on the master.
          • ReplicationRun_Local_1Indexing - simple test on indexing with replication,
          Show
          Ole Solberg added a comment - Attaching a patch for testing replication on encrypted databases. The patch also contains a couple of additional changes cleanup of support mechanisms for replication and a simple test for indexing in replicated databases. M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java Adding support for running replication tests on encrypted databases. ( DERBY-3921 .) Adding a support method (makeReadyForReplication()) which handles all setup to run a test on a replicated database. Use of this has been only partially implemented (Only in the tests touched by this patch.) Will simplify more of the replicationtests to use this later on. Adding support to run a simple (short time) replication load by default. To use the previous default load use '-Dderby.tests.replSimpleLoad'. M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3.java Adding support for running replication tests on encrypted databases. ( DERBY-3921 .) M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p4.java Adding support for running replication tests on encrypted databases. ( DERBY-3921 .) M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local.java testReplication_Local_existingTestsAsReplLoad() renamed to testReplication_Local_TestStraightReplication() M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p1.java M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p3.java Using param 'replicationTest=null' to NOT run any replication load. A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p5.java Test DERBY-3924 verifying the fix for DERBY-3878 : test for restart of slave after master has crashed. A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_3_p6.java Test for DERBY-3896 : failure in LogicalUndoOperation.doMe() when starting slave with uncommitted transactions on the master. testReplication_Local_3_p6_DERBY_3896() should be enabled when DERBY-3896 is fixed. A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_1Indexing.java Simple test to verify indexes are replicated. A java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_Encrypted_1.java DERBY-3921 : Testing replication of encrypted databases. M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part2.java Renaming some package internal methods. M java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java Enabling new tests: ReplicationRun_Local_Encrypted_1 - test for DERBY-3921 / test replication of encrypted db., ReplicationRun_Local_3_p5 - test for DERBY-3924 / replication: test for restart of slave after master has crashed, ReplicationRun_Local_3_p6 - test for DERBY-3896 / replication: failure in LogicalUndoOperation.doMe() when starting slave with uncommitted transactions on the master. ReplicationRun_Local_1Indexing - simple test on indexing with replication,
          Ole Solberg made changes -
          Assignee Ole Solberg [ olesolberg ]
          Kathey Marsden made changes -
          Component/s Replication [ 12312050 ]
          Jørgen Løland made changes -
          Field Original Value New Value
          Link This issue is blocked by DERBY-3890 [ DERBY-3890 ]
          Jørgen Løland created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development