Mahadev konar commented on ZOOKEEPER-367:

thanks for uploading the logs pat.. i think the problem is the following - 

- the snapshot is not valid (which is be possible since we use a different 
thread and we might shutdown the server before we finish snapshotting)
- the snapshot is thought to be valid since it ends with "/" (which is 
accidental). the current method only checks for a "/" at the end of the 
snapshot to think this is valid.
- the read method throws since it is actually invalid snapshot 

All we need to do is read the last snapshot and keep doing it until we can 
successfulyl read the last snapshot (catching IOException in deserializing 
snapshots and trying reading the older snapshot until we succeed, if we run out 
of snapshots we can declare error). I iwll post a patch for this as soon as I 
can. We can check in the data files as a part of the test for testing purpose.

> RecoveryTest failure - "unreasonable length" IOException
> --------------------------------------------------------
>                 Key: ZOOKEEPER-367
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-367
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.2.0
>         Environment: ubuntu 8.10 intrpid ibex, jvm 1.6.0_10
>            Reporter: Patrick Hunt
>            Priority: Critical
>             Fix For: 3.2.0
>         Attachments: invalid1.tar.gz, rec.tar.gz, rep2.tar.gz, 
> TEST-org.apache.zookeeper.test.RecoveryTest.txt
> during local testing I received the attached recoverytest failure

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

Reply via email to