You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Raul Gutierrez Segales <rg...@itevenworks.net> on 2014/06/26 21:09:10 UTC
Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/
-----------------------------------------------------------
Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
Bugs: ZOOKEEPER-827
https://issues.apache.org/jira/browse/ZOOKEEPER-827
Repository: zookeeper-git
Description
-------
commit 86a75dcaa67e099f8c5722f5190c601663e44c75
Author: Raul Gutierrez S <rg...@itevenworks.net>
Date: Thu Jun 26 11:19:11 2014 -0700
ZOOKEEPER-827. enable r/o mode in C client library
Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
:100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
:100644 100644 fe25015... b45ca0f... M src/c/README
:100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
:100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
:100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
:100644 100644 aab214d... 5505427... M src/c/src/cli.c
:100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
:100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
:100644 100644 795875e... 93464fb... M src/c/src/zookeeper.c
:100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
:000000 100644 0000000... 4e22bc7... A src/c/tests/TestReadOnlyClient.cc
:000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
:100644 100644 f97c943... 7de3ed3... M src/c/tests/ZKMocks.cc
:100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
:000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
:100755 100755 0af80f8... 2159e20... M src/c/tests/zkServer.sh
Diffs
-----
src/c/Makefile.am 6130c4d
src/c/README fe25015
src/c/include/zookeeper.h d5a3876
src/c/src/addrvec.h 5345ebc
src/c/src/addrvec.c 4134044
src/c/src/cli.c aab214d
src/c/src/load_gen.c 0d3ae19
src/c/src/zk_adaptor.h 21dc70c
src/c/src/zookeeper.c 795875e
src/c/tests/TestClientRetry.cc 41d5179
src/c/tests/TestReadOnlyClient.cc PRE-CREATION
src/c/tests/WatchUtil.h PRE-CREATION
src/c/tests/ZKMocks.h fbcfc4f
src/c/tests/ZKMocks.cc f97c943
src/c/tests/quorum.cfg PRE-CREATION
src/c/tests/zkServer.sh 0af80f8
Diff: https://reviews.apache.org/r/23081/diff/
Testing
-------
all tests pass, *should* compile on Windows.
Thanks,
Raul Gutierrez Segales
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/
-----------------------------------------------------------
(Updated July 7, 2014, 5:03 p.m.)
Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
Changes
-------
make sure it compiles in OS X.
Bugs: ZOOKEEPER-827
https://issues.apache.org/jira/browse/ZOOKEEPER-827
Repository: zookeeper-git
Description (updated)
-------
commit 4df2128848eef09b1cc25b13b1edc585f095f40f
Author: Raul Gutierrez S <rg...@itevenworks.net>
Date: Sun Jun 8 21:43:48 2014 -0700
ZOOKEEPER-827. enable r/o mode in C client library
Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
:100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
:100644 100644 fe25015... 045ef9a... M src/c/README
:100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
:100644 100644 4134044... e641a46... M src/c/src/addrvec.c
:100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
:100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
:100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
:100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
:100644 100644 795875e... 782ac52... M src/c/src/zookeeper.c
:100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
:000000 100644 0000000... 37ab147... A src/c/tests/TestReadOnlyClient.cc
:000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
:100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
:100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
:000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
:100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
Diffs (updated)
-----
src/c/Makefile.am 6130c4d
src/c/README fe25015
src/c/include/zookeeper.h d5a3876
src/c/src/addrvec.h 5345ebc
src/c/src/addrvec.c 4134044
src/c/src/cli.c aab214d
src/c/src/load_gen.c 0d3ae19
src/c/src/zk_adaptor.h 21dc70c
src/c/src/zookeeper.c 795875e
src/c/tests/TestClientRetry.cc 41d5179
src/c/tests/TestReadOnlyClient.cc PRE-CREATION
src/c/tests/WatchUtil.h PRE-CREATION
src/c/tests/ZKMocks.h fbcfc4f
src/c/tests/ZKMocks.cc f97c943
src/c/tests/quorum.cfg PRE-CREATION
src/c/tests/zkServer.sh 0af80f8
Diff: https://reviews.apache.org/r/23081/diff/
Testing
-------
all tests pass, *should* compile on Windows.
Thanks,
Raul Gutierrez Segales
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/
-----------------------------------------------------------
(Updated June 30, 2014, 8 p.m.)
Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
Changes
-------
updated according to Flavio's review.
Bugs: ZOOKEEPER-827
https://issues.apache.org/jira/browse/ZOOKEEPER-827
Repository: zookeeper-git
Description (updated)
-------
commit 3411d6bcf8ceadadd20b518166bf09aa32ffd282
Author: Raul Gutierrez S <rg...@itevenworks.net>
Date: Sun Jun 8 21:43:48 2014 -0700
ZOOKEEPER-827. enable r/o mode in C client library
Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
:100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
:100644 100644 fe25015... 045ef9a... M src/c/README
:100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
:100644 100644 4134044... e641a46... M src/c/src/addrvec.c
:100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
:100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
:100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
:100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
:100644 100644 795875e... 2579837... M src/c/src/zookeeper.c
:100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
:000000 100644 0000000... 37ab147... A src/c/tests/TestReadOnlyClient.cc
:000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
:100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
:100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
:000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
:100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
Diffs (updated)
-----
src/c/Makefile.am 6130c4d
src/c/README fe25015
src/c/include/zookeeper.h d5a3876
src/c/src/addrvec.h 5345ebc
src/c/src/addrvec.c 4134044
src/c/src/cli.c aab214d
src/c/src/load_gen.c 0d3ae19
src/c/src/zk_adaptor.h 21dc70c
src/c/src/zookeeper.c 795875e
src/c/tests/TestClientRetry.cc 41d5179
src/c/tests/TestReadOnlyClient.cc PRE-CREATION
src/c/tests/WatchUtil.h PRE-CREATION
src/c/tests/ZKMocks.h fbcfc4f
src/c/tests/ZKMocks.cc f97c943
src/c/tests/quorum.cfg PRE-CREATION
src/c/tests/zkServer.sh 0af80f8
Diff: https://reviews.apache.org/r/23081/diff/
Testing
-------
all tests pass, *should* compile on Windows.
Thanks,
Raul Gutierrez Segales
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
> On June 29, 2014, 11:04 a.m., fpj wrote:
> > src/c/include/zookeeper.h, line 124
> > <https://reviews.apache.org/r/23081/diff/3/?file=619678#file619678line124>
> >
> > As I understand it, this code indicates that a write operation was tried when connected to a read-only server. If this is right, then the code should be something like ZISREADONLY or simply ZREADONLY.
I would agree with you, except for the fact that the Java impl has it this way and I'd rather keep it consistent: https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/KeeperException.java#L383
> On June 29, 2014, 11:04 a.m., fpj wrote:
> > src/c/src/addrvec.c, line 207
> > <https://reviews.apache.org/r/23081/diff/3/?file=619680#file619680line207>
> >
> > Just a style comment, I'd rather use curly braces even if there is just a single line of code for the if.
fair call, updating.
> On June 29, 2014, 11:04 a.m., fpj wrote:
> > src/c/src/zookeeper.c, line 2067
> > <https://reviews.apache.org/r/23081/diff/3/?file=619684#file619684line2067>
> >
> > Same here, I'd rather use curly braces even if not necessary.
sure.
- Raul
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/#review46948
-----------------------------------------------------------
On June 27, 2014, 6:45 p.m., Raul Gutierrez Segales wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23081/
> -----------------------------------------------------------
>
> (Updated June 27, 2014, 6:45 p.m.)
>
>
> Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
>
>
> Bugs: ZOOKEEPER-827
> https://issues.apache.org/jira/browse/ZOOKEEPER-827
>
>
> Repository: zookeeper-git
>
>
> Description
> -------
>
> commit e93806d0a6dfd8b372b0557fb5dfbbaca6ae8178
> Author: Raul Gutierrez S <rg...@itevenworks.net>
> Date: Sun Jun 8 21:43:48 2014 -0700
>
> ZOOKEEPER-827. enable r/o mode in C client library
>
> Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
>
> :100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
> :100644 100644 fe25015... 045ef9a... M src/c/README
> :100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
> :100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
> :100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
> :100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
> :100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
> :100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
> :100644 100644 795875e... 3cc9393... M src/c/src/zookeeper.c
> :100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
> :000000 100644 0000000... 37ab147... A src/c/tests/TestReadOnlyClient.cc
> :000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
> :100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
> :100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
> :000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
> :100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
>
>
> Diffs
> -----
>
> src/c/Makefile.am 6130c4d
> src/c/README fe25015
> src/c/include/zookeeper.h d5a3876
> src/c/src/addrvec.h 5345ebc
> src/c/src/addrvec.c 4134044
> src/c/src/cli.c aab214d
> src/c/src/load_gen.c 0d3ae19
> src/c/src/zk_adaptor.h 21dc70c
> src/c/src/zookeeper.c 795875e
> src/c/tests/TestClientRetry.cc 41d5179
> src/c/tests/TestReadOnlyClient.cc PRE-CREATION
> src/c/tests/WatchUtil.h PRE-CREATION
> src/c/tests/ZKMocks.h fbcfc4f
> src/c/tests/ZKMocks.cc f97c943
> src/c/tests/quorum.cfg PRE-CREATION
> src/c/tests/zkServer.sh 0af80f8
>
> Diff: https://reviews.apache.org/r/23081/diff/
>
>
> Testing
> -------
>
> all tests pass, *should* compile on Windows.
>
>
> Thanks,
>
> Raul Gutierrez Segales
>
>
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by fp...@apache.org.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/#review46948
-----------------------------------------------------------
Ship it!
Just a few minor comments, otherwise it looks good.
src/c/include/zookeeper.h
<https://reviews.apache.org/r/23081/#comment82517>
As I understand it, this code indicates that a write operation was tried when connected to a read-only server. If this is right, then the code should be something like ZISREADONLY or simply ZREADONLY.
src/c/src/addrvec.c
<https://reviews.apache.org/r/23081/#comment82518>
Just a style comment, I'd rather use curly braces even if there is just a single line of code for the if.
src/c/src/zookeeper.c
<https://reviews.apache.org/r/23081/#comment82519>
Same here, I'd rather use curly braces even if not necessary.
- fpj
On June 27, 2014, 6:45 p.m., Raul Gutierrez Segales wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23081/
> -----------------------------------------------------------
>
> (Updated June 27, 2014, 6:45 p.m.)
>
>
> Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
>
>
> Bugs: ZOOKEEPER-827
> https://issues.apache.org/jira/browse/ZOOKEEPER-827
>
>
> Repository: zookeeper-git
>
>
> Description
> -------
>
> commit e93806d0a6dfd8b372b0557fb5dfbbaca6ae8178
> Author: Raul Gutierrez S <rg...@itevenworks.net>
> Date: Sun Jun 8 21:43:48 2014 -0700
>
> ZOOKEEPER-827. enable r/o mode in C client library
>
> Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
>
> :100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
> :100644 100644 fe25015... 045ef9a... M src/c/README
> :100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
> :100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
> :100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
> :100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
> :100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
> :100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
> :100644 100644 795875e... 3cc9393... M src/c/src/zookeeper.c
> :100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
> :000000 100644 0000000... 37ab147... A src/c/tests/TestReadOnlyClient.cc
> :000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
> :100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
> :100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
> :000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
> :100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
>
>
> Diffs
> -----
>
> src/c/Makefile.am 6130c4d
> src/c/README fe25015
> src/c/include/zookeeper.h d5a3876
> src/c/src/addrvec.h 5345ebc
> src/c/src/addrvec.c 4134044
> src/c/src/cli.c aab214d
> src/c/src/load_gen.c 0d3ae19
> src/c/src/zk_adaptor.h 21dc70c
> src/c/src/zookeeper.c 795875e
> src/c/tests/TestClientRetry.cc 41d5179
> src/c/tests/TestReadOnlyClient.cc PRE-CREATION
> src/c/tests/WatchUtil.h PRE-CREATION
> src/c/tests/ZKMocks.h fbcfc4f
> src/c/tests/ZKMocks.cc f97c943
> src/c/tests/quorum.cfg PRE-CREATION
> src/c/tests/zkServer.sh 0af80f8
>
> Diff: https://reviews.apache.org/r/23081/diff/
>
>
> Testing
> -------
>
> all tests pass, *should* compile on Windows.
>
>
> Thanks,
>
> Raul Gutierrez Segales
>
>
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/
-----------------------------------------------------------
(Updated June 27, 2014, 6:45 p.m.)
Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
Changes
-------
two more details that i left out (documenting that -r can go anywhere and an extra white space).
Bugs: ZOOKEEPER-827
https://issues.apache.org/jira/browse/ZOOKEEPER-827
Repository: zookeeper-git
Description (updated)
-------
commit e93806d0a6dfd8b372b0557fb5dfbbaca6ae8178
Author: Raul Gutierrez S <rg...@itevenworks.net>
Date: Sun Jun 8 21:43:48 2014 -0700
ZOOKEEPER-827. enable r/o mode in C client library
Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
:100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
:100644 100644 fe25015... 045ef9a... M src/c/README
:100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
:100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
:100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
:100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
:100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
:100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
:100644 100644 795875e... 3cc9393... M src/c/src/zookeeper.c
:100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
:000000 100644 0000000... 37ab147... A src/c/tests/TestReadOnlyClient.cc
:000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
:100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
:100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
:000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
:100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
Diffs (updated)
-----
src/c/Makefile.am 6130c4d
src/c/README fe25015
src/c/include/zookeeper.h d5a3876
src/c/src/addrvec.h 5345ebc
src/c/src/addrvec.c 4134044
src/c/src/cli.c aab214d
src/c/src/load_gen.c 0d3ae19
src/c/src/zk_adaptor.h 21dc70c
src/c/src/zookeeper.c 795875e
src/c/tests/TestClientRetry.cc 41d5179
src/c/tests/TestReadOnlyClient.cc PRE-CREATION
src/c/tests/WatchUtil.h PRE-CREATION
src/c/tests/ZKMocks.h fbcfc4f
src/c/tests/ZKMocks.cc f97c943
src/c/tests/quorum.cfg PRE-CREATION
src/c/tests/zkServer.sh 0af80f8
Diff: https://reviews.apache.org/r/23081/diff/
Testing
-------
all tests pass, *should* compile on Windows.
Thanks,
Raul Gutierrez Segales
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/
-----------------------------------------------------------
(Updated June 27, 2014, 6:35 p.m.)
Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
Changes
-------
updated according to Flavio's review & comments.
Bugs: ZOOKEEPER-827
https://issues.apache.org/jira/browse/ZOOKEEPER-827
Repository: zookeeper-git
Description (updated)
-------
commit ac80b1a5133c5c8132005b4f5498c395662a44e6
Author: Raul Gutierrez S <rg...@itevenworks.net>
Date: Sun Jun 8 21:43:48 2014 -0700
ZOOKEEPER-827. enable r/o mode in C client library
Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
:100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
:100644 100644 fe25015... b45ca0f... M src/c/README
:100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
:100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
:100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
:100644 100644 aab214d... a9d11e1... M src/c/src/cli.c
:100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
:100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
:100644 100644 795875e... 3cc9393... M src/c/src/zookeeper.c
:100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
:000000 100644 0000000... e50ac97... A src/c/tests/TestReadOnlyClient.cc
:000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
:100644 100644 f97c943... 263f3ce... M src/c/tests/ZKMocks.cc
:100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
:000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
:100755 100755 0af80f8... 33ab152... M src/c/tests/zkServer.sh
Diffs (updated)
-----
src/c/Makefile.am 6130c4d
src/c/README fe25015
src/c/include/zookeeper.h d5a3876
src/c/src/addrvec.h 5345ebc
src/c/src/addrvec.c 4134044
src/c/src/cli.c aab214d
src/c/src/load_gen.c 0d3ae19
src/c/src/zk_adaptor.h 21dc70c
src/c/src/zookeeper.c 795875e
src/c/tests/TestClientRetry.cc 41d5179
src/c/tests/TestReadOnlyClient.cc PRE-CREATION
src/c/tests/WatchUtil.h PRE-CREATION
src/c/tests/ZKMocks.h fbcfc4f
src/c/tests/ZKMocks.cc f97c943
src/c/tests/quorum.cfg PRE-CREATION
src/c/tests/zkServer.sh 0af80f8
Diff: https://reviews.apache.org/r/23081/diff/
Testing
-------
all tests pass, *should* compile on Windows.
Thanks,
Raul Gutierrez Segales
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by Raul Gutierrez Segales <rg...@itevenworks.net>.
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/README, line 90
> > <https://reviews.apache.org/r/23081/diff/1/?file=618570#file618570line90>
> >
> > This is minor, but does the option really have to be at the end? I'd say that either anywhere or before the host:port pair, no?
oh sure. didn't even pay attention to it when i did the rebase :-)
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/src/zookeeper.c, line 231
> > <https://reviews.apache.org/r/23081/diff/1/?file=618577#file618577line231>
> >
> > Let's use _WIN32 instead.
updated.
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/src/zookeeper.c, line 1470
> > <https://reviews.apache.org/r/23081/diff/1/?file=618577#file618577line1470>
> >
> > this is commented out, should we just remove it here?
agreed.
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/src/zookeeper.c, line 2265
> > <https://reviews.apache.org/r/23081/diff/1/?file=618577#file618577line2265>
> >
> > I'm not sure I'm following this part of the code. here we just spotted that we are in ro mode but shouldn't because we found an rw server. what does handle_error do about that?
it will force a disconnect and try to reconnect to the next server in the list, which is the rw one (given that we used addrvec_peek which doesn't advance the list, as addrvec_next does).
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/tests/ZKMocks.cc, line 58
> > <https://reviews.apache.org/r/23081/diff/1/?file=618582#file618582line58>
> >
> > spaces.
fixed - took the liberty to clean up the missing spaces in the rest of the file while i was at it (hope that's fine).
> On June 27, 2014, 5:37 p.m., fpj wrote:
> > src/c/tests/zkServer.sh, line 24
> > <https://reviews.apache.org/r/23081/diff/1/?file=618584#file618584line24>
> >
> > why are you calling startPeer the mode with ro enabled? startReadOnly seems more clear, no?
agreed, updated.
- Raul
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/#review46875
-----------------------------------------------------------
On June 26, 2014, 7:09 p.m., Raul Gutierrez Segales wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23081/
> -----------------------------------------------------------
>
> (Updated June 26, 2014, 7:09 p.m.)
>
>
> Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
>
>
> Bugs: ZOOKEEPER-827
> https://issues.apache.org/jira/browse/ZOOKEEPER-827
>
>
> Repository: zookeeper-git
>
>
> Description
> -------
>
> commit 86a75dcaa67e099f8c5722f5190c601663e44c75
> Author: Raul Gutierrez S <rg...@itevenworks.net>
> Date: Thu Jun 26 11:19:11 2014 -0700
>
> ZOOKEEPER-827. enable r/o mode in C client library
>
> Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
>
> :100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
> :100644 100644 fe25015... b45ca0f... M src/c/README
> :100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
> :100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
> :100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
> :100644 100644 aab214d... 5505427... M src/c/src/cli.c
> :100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
> :100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
> :100644 100644 795875e... 93464fb... M src/c/src/zookeeper.c
> :100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
> :000000 100644 0000000... 4e22bc7... A src/c/tests/TestReadOnlyClient.cc
> :000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
> :100644 100644 f97c943... 7de3ed3... M src/c/tests/ZKMocks.cc
> :100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
> :000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
> :100755 100755 0af80f8... 2159e20... M src/c/tests/zkServer.sh
>
>
> Diffs
> -----
>
> src/c/Makefile.am 6130c4d
> src/c/README fe25015
> src/c/include/zookeeper.h d5a3876
> src/c/src/addrvec.h 5345ebc
> src/c/src/addrvec.c 4134044
> src/c/src/cli.c aab214d
> src/c/src/load_gen.c 0d3ae19
> src/c/src/zk_adaptor.h 21dc70c
> src/c/src/zookeeper.c 795875e
> src/c/tests/TestClientRetry.cc 41d5179
> src/c/tests/TestReadOnlyClient.cc PRE-CREATION
> src/c/tests/WatchUtil.h PRE-CREATION
> src/c/tests/ZKMocks.h fbcfc4f
> src/c/tests/ZKMocks.cc f97c943
> src/c/tests/quorum.cfg PRE-CREATION
> src/c/tests/zkServer.sh 0af80f8
>
> Diff: https://reviews.apache.org/r/23081/diff/
>
>
> Testing
> -------
>
> all tests pass, *should* compile on Windows.
>
>
> Thanks,
>
> Raul Gutierrez Segales
>
>
Re: Review Request 23081: ZOOKEEPER-827. enable r/o mode in C client library
Posted by fp...@apache.org.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23081/#review46875
-----------------------------------------------------------
It looks good to me, I just have a few minor comments, and I need to finish checking the test cases. Also, it would be great if you could remove the additional spaces (red marks in the diff).
src/c/README
<https://reviews.apache.org/r/23081/#comment82441>
This is minor, but does the option really have to be at the end? I'd say that either anywhere or before the host:port pair, no?
src/c/src/zookeeper.c
<https://reviews.apache.org/r/23081/#comment82442>
Let's use _WIN32 instead.
src/c/src/zookeeper.c
<https://reviews.apache.org/r/23081/#comment82443>
this is commented out, should we just remove it here?
src/c/src/zookeeper.c
<https://reviews.apache.org/r/23081/#comment82444>
I'm not sure I'm following this part of the code. here we just spotted that we are in ro mode but shouldn't because we found an rw server. what does handle_error do about that?
src/c/tests/ZKMocks.cc
<https://reviews.apache.org/r/23081/#comment82448>
spaces.
src/c/tests/zkServer.sh
<https://reviews.apache.org/r/23081/#comment82449>
why are you calling startPeer the mode with ro enabled? startReadOnly seems more clear, no?
- fpj
On June 26, 2014, 7:09 p.m., Raul Gutierrez Segales wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23081/
> -----------------------------------------------------------
>
> (Updated June 26, 2014, 7:09 p.m.)
>
>
> Review request for zookeeper, fpj, michim, Patrick Hunt, Rakesh R, and Thawan Kooburat.
>
>
> Bugs: ZOOKEEPER-827
> https://issues.apache.org/jira/browse/ZOOKEEPER-827
>
>
> Repository: zookeeper-git
>
>
> Description
> -------
>
> commit 86a75dcaa67e099f8c5722f5190c601663e44c75
> Author: Raul Gutierrez S <rg...@itevenworks.net>
> Date: Thu Jun 26 11:19:11 2014 -0700
>
> ZOOKEEPER-827. enable r/o mode in C client library
>
> Signed-off-by: Raul Gutierrez S <rg...@itevenworks.net>
>
> :100644 100644 6130c4d... a7b2621... M src/c/Makefile.am
> :100644 100644 fe25015... b45ca0f... M src/c/README
> :100644 100644 d5a3876... 18a203d... M src/c/include/zookeeper.h
> :100644 100644 4134044... c6887f5... M src/c/src/addrvec.c
> :100644 100644 5345ebc... 3897095... M src/c/src/addrvec.h
> :100644 100644 aab214d... 5505427... M src/c/src/cli.c
> :100644 100644 0d3ae19... 0c513e8... M src/c/src/load_gen.c
> :100644 100644 21dc70c... eec505c... M src/c/src/zk_adaptor.h
> :100644 100644 795875e... 93464fb... M src/c/src/zookeeper.c
> :100644 100644 41d5179... c6536dc... M src/c/tests/TestClientRetry.cc
> :000000 100644 0000000... 4e22bc7... A src/c/tests/TestReadOnlyClient.cc
> :000000 100644 0000000... 035f26d... A src/c/tests/WatchUtil.h
> :100644 100644 f97c943... 7de3ed3... M src/c/tests/ZKMocks.cc
> :100644 100644 fbcfc4f... 2717ded... M src/c/tests/ZKMocks.h
> :000000 100644 0000000... aa2dd8c... A src/c/tests/quorum.cfg
> :100755 100755 0af80f8... 2159e20... M src/c/tests/zkServer.sh
>
>
> Diffs
> -----
>
> src/c/Makefile.am 6130c4d
> src/c/README fe25015
> src/c/include/zookeeper.h d5a3876
> src/c/src/addrvec.h 5345ebc
> src/c/src/addrvec.c 4134044
> src/c/src/cli.c aab214d
> src/c/src/load_gen.c 0d3ae19
> src/c/src/zk_adaptor.h 21dc70c
> src/c/src/zookeeper.c 795875e
> src/c/tests/TestClientRetry.cc 41d5179
> src/c/tests/TestReadOnlyClient.cc PRE-CREATION
> src/c/tests/WatchUtil.h PRE-CREATION
> src/c/tests/ZKMocks.h fbcfc4f
> src/c/tests/ZKMocks.cc f97c943
> src/c/tests/quorum.cfg PRE-CREATION
> src/c/tests/zkServer.sh 0af80f8
>
> Diff: https://reviews.apache.org/r/23081/diff/
>
>
> Testing
> -------
>
> all tests pass, *should* compile on Windows.
>
>
> Thanks,
>
> Raul Gutierrez Segales
>
>