#64 Removed unused variables from FastLeaderElection

closed-fixed
server (27)
7
2008-05-08
2008-05-05
fpj
No

Removed unused variables from FastLeaderElection.

-Flavio

Discussion

  • Patrick Hunt

    Patrick Hunt - 2008-05-06
    • priority: 5 --> 7
    • assigned_to: nobody --> mahadevkonar
     
  • Patrick Hunt

    Patrick Hunt - 2008-05-06

    Logged In: YES
    user_id=12853
    Originator: NO

    The assignee is responsible for closing (committing) this patch (see ZooKeeperPatches on wiki) -- this includes getting additional review if necessary.

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-06

    Logged In: YES
    user_id=12853
    Originator: NO

    There is an issue with this patch:

    1) line 248 has "rand" variable which the patch removes initialization, but not the field

    also:

    2) cleanup imports (remove random and zoolog)

    3) there are more unused vars which could be removed, lines; 152, 250, 269

    Btw - if you are using eclipse you can get findbugs at:
    http://findbugs.sourceforge.net/manual/eclipse.html

     
  • fpj

    fpj - 2008-05-07

    Logged In: YES
    user_id=1926444
    Originator: YES

    No, they are patches for different implementations. I separated them to make it easier to review the patches.

    -Flavio

     
  • fpj

    fpj - 2008-05-07

    Second attempt.

     
  • fpj

    fpj - 2008-05-07

    Logged In: YES
    user_id=1926444
    Originator: YES

    File Added: patch-fle.diff

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-07

    Logged In: YES
    user_id=12853
    Originator: NO

    Flavio please delete the old patch(es).

     
  • Mahadev Konar

    Mahadev Konar - 2008-05-08

    Logged In: YES
    user_id=1926680
    Originator: NO

    +1 looks good but the only problem is with ^M charaters present in the patch. Can you get rid of this? it usually happens on windows files that they have ^M charaters at the end of line...

     
  • Mahadev Konar

    Mahadev Konar - 2008-05-08
    • status: open --> closed-fixed
     
  • Mahadev Konar

    Mahadev Konar - 2008-05-08

    Logged In: YES
    user_id=1926680
    Originator: NO

    ok ... i updated the patch myself ...

    committed to revision
    154

    but two points for future flavio :)--

    1) the diff should be generated from the zookeeper directory. this patch had diff from C:/ something
    2) make sure that the patch does not have any windows characters.

    also another bug would be to open some indentation issues in the original code in fast le (not in the patch).

     
  • Patrick Hunt

    Patrick Hunt - 2008-05-08

    Logged In: YES
    user_id=12853
    Originator: NO

    Mahadev re point 1 - just use the "patch -p# < patchfile" option, it will correctly strip the prefix (you need to tell it what depth via the #, -p3 strips 3 from the prefix dirhier).

     
  • Mahadev Konar

    Mahadev Konar - 2008-05-08

    Logged In: YES
    user_id=1926680
    Originator: NO

    yes . thats how I applied the patch. Its generally a good practice to upload a patch from the trunk so that the reviewer and the committer can just do patch -p0 and be done with it..

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks