ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-874

FileTxnSnapLog.restore does not call listener

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.4.0
    • Component/s: leaderElection
    • Labels:
      None
    • Tags:
      leader election

      Description

      FileTxnSnapLog.restore() does not call listener passed as parameter. The result is that the commitLogs list is empty. When a follower connects to the leader, the leader is forced to send a snapshot to the follower instead of a couple of requests and commits.

        Issue Links

          Activity

          Diogo created issue -
          Diogo made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Affects Version/s 3.3.1 [ 12314846 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Diogo made changes -
          Attachment commitlog-listener.patch [ 12454865 ]
          Hide
          Flavio Junqueira added a comment -

          The patch is indeed trivial, but I was wondering if we could write a unit test to verify that it is effective in the case you have identified, Diogo.

          Show
          Flavio Junqueira added a comment - The patch is indeed trivial, but I was wondering if we could write a unit test to verify that it is effective in the case you have identified, Diogo.
          Diogo made changes -
          Link This issue blocks ZOOKEEPER-876 [ ZOOKEEPER-876 ]
          Hide
          Diogo added a comment -

          The same as before but now with correct indentation and filename.

          Show
          Diogo added a comment - The same as before but now with correct indentation and filename.
          Diogo made changes -
          Attachment ZOOKEEPER-874.patch [ 12455142 ]
          Diogo made changes -
          Attachment commitlog-listener.patch [ 12454865 ]
          Patrick Hunt made changes -
          Assignee Diogo [ dioog ]
          Hide
          Hadoop QA added a comment -

          -1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12455142/ZOOKEEPER-874.patch
          against trunk revision 1033155.

          +1 @author. The patch does not contain any @author tags.

          -1 tests included. The patch doesn't appear to include any new or modified tests.
          Please justify why no new tests are needed for this patch.
          Also please list what manual steps were performed to verify this patch.

          +1 javadoc. The javadoc tool did not generate any warning messages.

          +1 javac. The applied patch does not increase the total number of javac compiler warnings.

          +1 findbugs. The patch does not introduce any new Findbugs warnings.

          +1 release audit. The applied patch does not increase the total number of release audit warnings.

          -1 core tests. The patch failed core unit tests.

          +1 contrib tests. The patch passed contrib unit tests.

          Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//testReport/
          Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//console

          This message is automatically generated.

          Show
          Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12455142/ZOOKEEPER-874.patch against trunk revision 1033155. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/11//console This message is automatically generated.
          Hide
          Patrick Hunt added a comment -

          Cancelling patch, could you provide a tests that verifies this issue is addressed? Thanks.

          Show
          Patrick Hunt added a comment - Cancelling patch, could you provide a tests that verifies this issue is addressed? Thanks.
          Patrick Hunt made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Hide
          Diogo added a comment -

          The same patch now with test case

          Show
          Diogo added a comment - The same patch now with test case
          Diogo made changes -
          Attachment ZOOKEEPER-874.patch [ 12476003 ]
          Diogo made changes -
          Attachment ZOOKEEPER-874.patch [ 12455142 ]
          Hide
          Flavio Junqueira added a comment -

          +1, looks good to me. Thanks, Diogo!

          Show
          Flavio Junqueira added a comment - +1, looks good to me. Thanks, Diogo!
          Hide
          Flavio Junqueira added a comment -

          Committed revision 1091841.

          Thanks again, Diogo.

          Show
          Flavio Junqueira added a comment - Committed revision 1091841. Thanks again, Diogo.
          Flavio Junqueira made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #1153 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1153/)
          ZOOKEEPER-874. FileTxnSnapLog.restore does not call listener (diogo via fpj)

          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #1153 (See https://hudson.apache.org/hudson/job/ZooKeeper-trunk/1153/ ) ZOOKEEPER-874 . FileTxnSnapLog.restore does not call listener (diogo via fpj)
          Mahadev konar made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Link This issue blocks ZOOKEEPER-876 [ ZOOKEEPER-876 ]
          Gavin made changes -
          Link This issue is depended upon by ZOOKEEPER-876 [ ZOOKEEPER-876 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          9m 30s 1 Diogo 17/Sep/10 17:10
          Patch Available Patch Available Open Open
          53d 9h 28m 1 Patrick Hunt 10/Nov/10 01:39
          Open Open Resolved Resolved
          154d 14h 31m 1 Flavio Junqueira 13/Apr/11 17:10
          Resolved Resolved Closed Closed
          224d 3h 11m 1 Mahadev konar 23/Nov/11 19:22

            People

            • Assignee:
              Diogo
              Reporter:
              Diogo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development