You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2008/06/11 00:43:45 UTC

[jira] Created: (ZOOKEEPER-38) headers (version+) in log/snap files

headers (version+) in log/snap files
------------------------------------

                 Key: ZOOKEEPER-38
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
             Project: Zookeeper
          Issue Type: New Feature
          Components: server
            Reporter: Patrick Hunt
            Assignee: Andrew Kornev
             Fix For: 3.0.0


Moved from SourceForge to Apache.
http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Status: Patch Available  (was: Open)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608899#action_12608899 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

Property changes on: C:\work\apache\zookeeper\trunk\src\java\test\org\apache\zookeeper\server\DataTreeMock.java
___________________________________________________________________
Name: svn:eol-style
   + native


there are some changes that are not a patch fo this patch i think and are alos not relative to the src tree!! could you get rid of them andrew and upload the patch again?



> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607147#action_12607147 ] 

mahadev edited comment on ZOOKEEPER-38 at 6/22/08 10:57 PM:
------------------------------------------------------------------

i was reading through the patch. It would be good if a broad overview of what each class is doing ..lso there is a lack of javadocs :) (it would help if javadocs are provided while reviewing ).... 

      was (Author: mahadev):
    i was reading through the patch. It would be good if a broad overview of what each class is doing ..lso there are no javadocs :) (it would help if javadocs are provided while reviewing ).... 
  
> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Status: Patch Available  (was: Open)

Attached are the patches for the db file header and the CRC [ZOOKEEPER-32] features, and the unit tests. The patches are generated against the latest code in Source Forge SVN.

The patch introduces a new zookeeper package: the persistence layer. The package declares a number of public (zookeeper server scope) interfaces: TxnLogFactory, DBInfo, LogReader and LogWriter. The ZooKeeperServer, SyncProcessor and QuorumPeer classes are now relying exclusively on these interfaces to perform snapshotting and logging operations. All of the existing persistence-related code has been factored out to the new package peristence.log which provides the implementations of the above public interfaces.

The persistence.ProviderRegistry class is used during the server initialization to obtain an instance of TxnLogFactory based on the user-provided URI. From that moment on, the server uses the factory to access LogReader and LogWriter interfaces.

This is my strong belief that this design improves decoulping and separation of concerns. As a result this will allow us to provide new implementations of the persistence layer more easily. Also, this is a step toward improved testability and simpler code structure, which ideally should make it easier for people to contribute to the project.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632054#action_12632054 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

forgot to mention that this does not pass the tests. I am still workong on making it more cleaner :) and pass the tests.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment:     (was: db-header-crc-unittest.patch)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Status: Patch Available  (was: Open)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611885#action_12611885 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

the patch looks good --- here are some of my comments --- 

also I am not finished reviewing it :). its a long patch --- 

0) overall there are too many interfaces in the patch. though i uinderstand that interfaces make things pluggable but I think we should restrict only wehn we need it and create interfaces only when we seriously think that it would be good to have it pluggable.

1) DataTereeBuilder is an interface and has only one subclass --- i think that we should not make this pluggable and just have a datatree class instead of the interfaces and implementing classes.
2) FileDBINFO implements DBINFO but  FILEDBINFO Is the only subclass of DBINFO. I think here again we should just keep it simple and not make this an interface and pluggable.
3) Snapshotting plicy is again pluggable -- we should also not make this pluggable and let it work our default implementation.
4) we have arguments passing around as url though there are not true url's in java -- but just strings. if we really want to make this pluggable and use url's then we should use URL class in java and use its methods for checking what kind of provider we want it to return. like create a URL(string) and url.getProtocol.equals("file") then we retrun our default one.
5) i dont see any use case of more persistence layers as -D expressions? what if we had something like this 

-Dpersisten.provider=classname and then just use reflections to create the provider class else we just return the default provider. I think it makes the code simpler.

i am not done reviewing the patch entirely. :) 


> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38.patch

The same patch but is now built against the apache SVN. Please review.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment: db-header-crc-unittest.patch
                db-header-crc-1.patch

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612208#action_12612208 ] 

Andrew Kornev commented on ZOOKEEPER-38:
----------------------------------------

While JIRA comments is not the best place to discuss basics of object-oriented design, I'd like to point out that interfaces are not about "pluggability" and the number of potential implementations is not an indication of whether or not an interface should be introduced. I highly recommend the reviewer take another look at Design Patterns by GoF (chapters 1 and 2) and Emergent Design by Scott L. Bain just to name a few (both of them are available on Safari).

I also recommend the reviewer take a look at the unit tests included with the patch. There, one can see how loose coupling (achieved thru the use of interfaces, among other things) improves testability of the code. It is now possible to unit test classes individually and in isolation -- something that has never been possible with the existing zookeeper code before.

Wrt point 4, I'll update the code to use the URL class instead.
Wrt point 5, if I understand the question correctly, what if we want to run multiple zookeeper servers within the same JVM and you want to be able to associate different providers with each of those servers? Besides, we get this feature essentially for free. There is one extra line of code (the while() statement) that deals with loading multiple providers.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-38:
-----------------------------------

    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Incompatible change])

+1 Looks good mahadev. Marked as an Incompatible change since the data format is not backwards compatible.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_10.patch, ZOOKEEPER-38_11.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607147#action_12607147 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

i was reading through the patch. It would be good if a broad overview of what each class is doing .. :) also there are no javadocs :) (it would help if javadocs are provided while reviewing :) ).... 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed reassigned ZOOKEEPER-38:
--------------------------------------

    Assignee: Mahadev konar  (was: Benjamin Reed)

Mahadev is simplifying the patch.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614540#action_12614540 ] 

Benjamin Reed commented on ZOOKEEPER-38:
----------------------------------------

I really like how you pulled the code out of the scattered locations around the source tree. I wish you would have pulled them into a couple of classes rather than scattering them into new classes. It seems like it would be really nice to have a Snapshot class and a TxnLog class. I think classes like SerializeUtils, AsyncSnapshotPolicy, Util, FileLogWriter, FileLogProvider, FileDBInfo (perhaps others) could be pulled into these classes. I agree with Mahadev that the extra interfaces seem overkill for the simple requirements of this Jira. The provider classes are also overkill for this Jira. Perhaps in the future we may need something like that, but I'd rather wait for the need than try and foresee a solution now.

Mahadev and I will take a crack at collapsing these classes down.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_10.patch

this patch reverts backs the changes for ZOOKEEPER-82. my patch over rode all the changes.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_10.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_8.patch

here is an updated patch. I cleared the patch with nice javadocs and more testing. Fixed a few bugs i found during the testing.     

  bq.  In  ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we   should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
i am not sure abt this. did i remove something?
   
 bq. In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
 you are right... i would rather have it as another jira since this would be an improved over our earilier versions and would help getting this in without more delay :). 
    
bq. SnapLog should really be called Snapshot since it does not have a log component
done.

bq. In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
done.
    
bq. In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
done... thats is true... I will open another jira for this as well. 
   
 bq. In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
done.
  
 bq. TxnLogCompletion is not used and should be removed
done. 
  
bq. The Util class has some methods that are not used that should be removed.
done.
[ Show » ]
Benjamin Reed - 24/Sep/08 12:50 PM This looks great Mahadev. Just small comments:

    * In ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
    * In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
    * SnapLog should really be called Snapshot since it does not have a log component
    * In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
    * In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
    * In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
    * TxnLogCompletion is not used and should be removed
    * The Util class has some methods that are not used that should be removed.



> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_5.patch

Here is a preliminary patch. I redid the patch for this issue. THe previous patch was complex. Now there are just two calss in the persistence layer. One for snapshot and the other for logs. There is another class FileTxnSnapLog that provides conviniecne methods for using the txnlog and snapshots. I think this is much more cleaner and understandable.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636329#action_12636329 ] 

Hudson commented on ZOOKEEPER-38:
---------------------------------

Integrated in ZooKeeper-trunk #101 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/101/])
    

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_10.patch, ZOOKEEPER-38_11.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Status: Open  (was: Patch Available)

cancelling the patch for now. ill upload a new version of the patch with Ben's comments incorporated. 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Benjamin Reed
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Hadoop Flags: [Incompatible change]

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38.patch

Added more javadocs, use the URI class for passing provider URLs, implemented support for terminating the server if the database files format is not supported (wrong version).

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Status: Open  (was: Patch Available)

lets wait for code base to have moved and the patch would need header changes. Cancelling the patch for now.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_6.patch

here is aptch that passes the tests (exception recovery test). I am making some more interface cleanup changes. Ben can you take a look at this...

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_3.patch

this is the latest updated patch that applies to the trunk ... 


> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Reed updated ZOOKEEPER-38:
-----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Incompatible change, Reviewed]  (was: [Reviewed, Incompatible change])
          Status: Resolved  (was: Patch Available)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_10.patch, ZOOKEEPER-38_11.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38.patch

Uploading the patch (fixed the paths for the property changes)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607147#action_12607147 ] 

mahadev edited comment on ZOOKEEPER-38 at 6/22/08 10:55 PM:
------------------------------------------------------------------

i was reading through the patch. It would be good if a broad overview of what each class is doing ..lso there are no javadocs :) (it would help if javadocs are provided while reviewing ).... 

      was (Author: mahadev):
    i was reading through the patch. It would be good if a broad overview of what each class is doing .. :) also there are no javadocs :) (it would help if javadocs are provided while reviewing :) ).... 
  
> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: db-header-crc-1.patch, db-header-crc-unittest.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_7.patch

here is patch that passes all the tests. 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_11.patch

the last patch had a problem with compiling jmx ... since the jmx build is broken is didnt realize that I broke the jmx build with my patch... 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_10.patch, ZOOKEEPER-38_11.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_9.patch

the last patch went stale with commiting of ZOOKEEPER-139.



> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev reassigned ZOOKEEPER-38:
--------------------------------------

    Assignee: Benjamin Reed  (was: Andrew Kornev)

How's the cracking been going so far?

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Benjamin Reed
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634267#action_12634267 ] 

Benjamin Reed commented on ZOOKEEPER-38:
----------------------------------------

This looks great Mahadev. Just  small comments:

- In ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
- In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
- SnapLog should really be called Snapshot since it does not have a log component
- In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
- In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
- In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
- TxnLogCompletion is not used and should be removed
- The Util class has some methods that are not used that should be removed.


> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634616#action_12634616 ] 

mahadev edited comment on ZOOKEEPER-38 at 9/25/08 2:00 PM:
-----------------------------------------------------------------

here is an updated patch. I cleared the patch with nice javadocs and more testing. Fixed a few bugs i found during the testing.     

  bq.  In  ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we   should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
i am not sure abt this. did i remove something?
   
 bq. In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
 you are right... i would rather have it as another jira since this would be an improved over our earilier versions and would help getting this in without more delay :). 
    
bq. SnapLog should really be called Snapshot since it does not have a log component
done.

bq. In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
done.
    
bq. In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
done... thats is true... I will open another jira for this as well. 
   
 bq. In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
done.
  
 bq. TxnLogCompletion is not used and should be removed
done. 
  
bq. The Util class has some methods that are not used that should be removed.
done.


      was (Author: mahadev):
    here is an updated patch. I cleared the patch with nice javadocs and more testing. Fixed a few bugs i found during the testing.     

  bq.  In  ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we   should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
i am not sure abt this. did i remove something?
   
 bq. In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
 you are right... i would rather have it as another jira since this would be an improved over our earilier versions and would help getting this in without more delay :). 
    
bq. SnapLog should really be called Snapshot since it does not have a log component
done.

bq. In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
done.
    
bq. In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
done... thats is true... I will open another jira for this as well. 
   
 bq. In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
done.
  
 bq. TxnLogCompletion is not used and should be removed
done. 
  
bq. The Util class has some methods that are not used that should be removed.
done.
[ Show » ]
Benjamin Reed - 24/Sep/08 12:50 PM This looks great Mahadev. Just small comments:

    * In ZooKeeperServerMain you changed from using the configuration methods to putting everything in the constructor. I think we should stick with the configuration methods. (This same comment applies to Leader and QuorumPeer
    * In FileSnapLog.deserialize() if the snapshot is bad, you should try an earlier snapshot. (We should add a test case for this)
    * SnapLog should really be called Snapshot since it does not have a log component
    * In FileTxnLog.getLogFiles() you should add a comment to the first (fzxid > logZxid) check that you are taking advantage of the fact that the files are sorted, so the last time this condition is true will be for the log file that has snapshotZxid.
    * In FileTxnLog.getLastLoggedZxid() the comment is a bit unclear. I think this method will also have a problem if the last logfile consists of a single corrupt entry.
    * In FileTxnLog.truncate() you may need to delete files as well if the zxid you are truncing to is in a log file before the last file
    * TxnLogCompletion is not used and should be removed
    * The Util class has some methods that are not used that should be removed.


  
> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_1.patch

here's a first look at the patch. I am still in process of cleaning it up and adding javadocs. Please review and comment. Ben wil be making changes to the tests. 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Comment: was deleted

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch, ZOOKEEPER-38_3.patch, ZOOKEEPER-38_5.patch, ZOOKEEPER-38_6.patch, ZOOKEEPER-38_7.patch, ZOOKEEPER-38_8.patch, ZOOKEEPER-38_9.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-38:
-----------------------------------

    Attachment: ZOOKEEPER-38_2.patch

here is a  patch that applies to the trunk. 
the last 2 commits made the patch stale.

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Mahadev konar
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38_1.patch, ZOOKEEPER-38_2.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Andrew Kornev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kornev updated ZOOKEEPER-38:
-----------------------------------

    Attachment:     (was: db-header-crc-1.patch)

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612222#action_12612222 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

i have no intention to discuss the basics of object oriented design on jira. sorry if I meant that in anyway. 
All i was pointing out is that the code has become really hard to read just because we have lots and lots of unnecessary interfaces and there implementations. I am not arguing against interfaces. I understand that interfaces are not just for pluggalbility.  I apologize for the lack of my knowledge and my failure to understand the use of interfaces in some of the places! ill let someone else review the code!! 

Though For the patch submitters knowledge I have read some of the design patterns books. 


> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Andrew Kornev
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-38) headers (version+) in log/snap files

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616637#action_12616637 ] 

Mahadev konar commented on ZOOKEEPER-38:
----------------------------------------

i am working on it... should get it out by next week .... 

> headers (version+) in log/snap files
> ------------------------------------
>
>                 Key: ZOOKEEPER-38
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-38
>             Project: Zookeeper
>          Issue Type: New Feature
>          Components: server
>            Reporter: Patrick Hunt
>            Assignee: Benjamin Reed
>             Fix For: 3.0.0
>
>         Attachments: ZOOKEEPER-38.patch, ZOOKEEPER-38.patch, ZOOKEEPER-38.patch
>
>
> Moved from SourceForge to Apache.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1961767&group_id=209147&atid=1008547

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.