[jira] Commented: (ZOOKEEPER-784) server-side functionality for read-only mode

2010-06-27 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882975#action_12882975
 ] 

Hadoop QA commented on ZOOKEEPER-784:
-

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

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

+1 tests included.  The patch appears to include 10 new or modified tests.

+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 generated 20 release audit warnings 
(more than the trunk's current 17 warnings).

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

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

Test results: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/125/testReport/
Release audit warnings: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/125/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt
Findbugs warnings: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/125/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/125/console

This message is automatically generated.

> server-side functionality for read-only mode
> 
>
> Key: ZOOKEEPER-784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-784
> Project: Zookeeper
>  Issue Type: Sub-task
>Reporter: Sergey Doroshenko
>Assignee: Sergey Doroshenko
> Attachments: ZOOKEEPER-784.patch, ZOOKEEPER-784.patch, 
> ZOOKEEPER-784.patch, ZOOKEEPER-784.patch
>
>
> As per http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode , create 
> ReadOnlyZooKeeperServer which comes into play when peer is partitioned.

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



Re: Quorum tests improvement

2010-06-27 Thread Sergey Doroshenko
I created the first version of such class in the last patch for
https://issues.apache.org/jira/browse/ZOOKEEPER-784


One good thing to have in such class is peers partitioning. E.g. for 5-peers
ensemble, emulate a situation when 3 peers are in one datacenter, 2 are in
another, and datacenters become partitioned.
However this doesn't look easy. One solution is to abstract networking code
(leader-learner communication and leader election) and inject rules like "if
i'm from datacenter 1, i'm not talking to datacenter 2" for testing.

I also posted generalized version of this question to stackoverflow:
http://bit.ly/clpq7u

Do you have some thoughts on how to better implement this?


On Fri, Jun 25, 2010 at 10:12 PM, Patrick Hunt  wrote:

> Sounds like a good idea to me, improving our ability to test quorum
> configurations would be great.
>
> Patrick
>
>
> On 06/23/2010 11:46 AM, Sergey Doroshenko wrote:
>
>> While incorporating tests for read-only mode, I found I don't like how
>> QuorumBase, the main utility for quorum testing, is made -- it has 5
>> fields
>> for 5 QuorumPeers, also 5 fields for ports, 5 fields for directories. In
>> general, it's very inflexible (you can't easily shutdown particular peer
>> and
>> then bring up, etc) and hard-coded.
>>
>> I think it would be nice to create a class which would setup 2n+1 peers,
>> and
>> it would be possible to start/stop all peers / particular peer / n+1 peers
>> etc. And make QuorumBase particular case of this class with n=2.
>>
>> What do you think?
>>
>>


-- 
Regards, Sergey


[jira] Updated: (ZOOKEEPER-784) server-side functionality for read-only mode

2010-06-27 Thread Sergey Doroshenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Doroshenko updated ZOOKEEPER-784:


Status: Patch Available  (was: Open)

> server-side functionality for read-only mode
> 
>
> Key: ZOOKEEPER-784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-784
> Project: Zookeeper
>  Issue Type: Sub-task
>Reporter: Sergey Doroshenko
>Assignee: Sergey Doroshenko
> Attachments: ZOOKEEPER-784.patch, ZOOKEEPER-784.patch, 
> ZOOKEEPER-784.patch, ZOOKEEPER-784.patch
>
>
> As per http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode , create 
> ReadOnlyZooKeeperServer which comes into play when peer is partitioned.

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



[jira] Updated: (ZOOKEEPER-784) server-side functionality for read-only mode

2010-06-27 Thread Sergey Doroshenko (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Doroshenko updated ZOOKEEPER-784:


Attachment: ZOOKEEPER-784.patch

* As per Henry's suggestion, updated QuorumePeer to wait some time before 
starting RO server (currently it's 1 tickTime)
* About watches: no, setting watches doesn't turn operation to a write 
operation. 
If a client is connected to a partitioned server and sets a watch in r/o mode, 
and meanwhile data is changed in the majority part, the watch will be triggered 
when the client reconnects to the majority. This is consistent with the current 
behavior, that is, if a watch is set before partitioning, it's triggered upon 
rejoining if there's any change
* Added a test to ensure read operations succeed in r/o mode and write 
operations fail.
Created QuorumUtil class which encapsulates quorum testing logic, e.g. allows 
to start/shutdown all peers or particular ones. It's used in the new test for 
r/o mode. I will refactor QuorumBase to be a special case of QuorumUtil.

What I'll do next is update wiki page to address Patrick's comments and make 
r/o client to seek for r/w server (currently if client's connected to a r/o 
server it doesn't try to find another server).

> server-side functionality for read-only mode
> 
>
> Key: ZOOKEEPER-784
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-784
> Project: Zookeeper
>  Issue Type: Sub-task
>Reporter: Sergey Doroshenko
>Assignee: Sergey Doroshenko
> Attachments: ZOOKEEPER-784.patch, ZOOKEEPER-784.patch, 
> ZOOKEEPER-784.patch, ZOOKEEPER-784.patch
>
>
> As per http://wiki.apache.org/hadoop/ZooKeeper/GSoCReadOnlyMode , create 
> ReadOnlyZooKeeperServer which comes into play when peer is partitioned.

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



[jira] Commented: (ZOOKEEPER-793) Large-scale Pub/Sub System (C++ Client)

2010-06-27 Thread Thiruvalluvan M. G. (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882950#action_12882950
 ] 

Thiruvalluvan M. G. commented on ZOOKEEPER-793:
---

I've not gone into the actual logic of this implementation. The following 
comments are based on the common C++ best practices.
   - The main interface Client uses the pimpl idiom, which is great. Is it 
possible to separate interface and the implementation? This will help our 
clients to unit test their wares without a server by mocking the interface.
   - The client should be non-copyable. The simplest way to do it is to 
privately derive from boost::noncopyable. With the current implementation, a 
copy of client will cause the Impl destructed twice. I guess Publisher and 
Subscriber should also be made non-copyable.
  - Some non-const references are being passed, where, I think, const reference 
is intended. E.g. Publisher::asyncPublish's callback parameter.
  - Client class does not follow the "rule-of-three": 
http://en.wikipedia.org/wiki/Rule_of_three_%28C%2B%2B_programming%29
  - Herb Sutter advices to "Avoid Exception Specifications" - Item 75 in 
http://www.gotw.ca/publications/c++cs.htm

I don't have a Linux box handy. I'll get one and try this out.

> Large-scale Pub/Sub System (C++ Client)
> ---
>
> Key: ZOOKEEPER-793
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-793
> Project: Zookeeper
>  Issue Type: Sub-task
>Reporter: Ivan Kelly
>Assignee: Ivan Kelly
> Attachments: hedwig-cpp-0.1.tar.gz
>
>
> Write a c++ client for hedwig

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