[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-07-26 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/584
  
This is good enough to make the ephemerals thread safe in DataTree, if it's 
being called in multiple thread, the code you touched here may add ephemerals 
which is just removed in killSession.

A lot of code inside DataTree assumes that there is a single thread will 
call it, and it's guaranteed from FinalRequestProcessor, which is called from 
the WorkerService in CommitProcessor, and CommitProcessor guarantees only a 
single write is allowed at a time. So I agree with Ben, I don't think we need 
this change.


---


Success: ZOOKEEPER- PreCommit Build #2004

2018-07-26 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2004/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 78.39 MB...]
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +0 tests included.  The patch appears to be a documentation 
patch that doesn't require tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2004//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2004//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2004//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=EDBF1F11282B62FAF5E6387F604B040C.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 17 minutes 24 seconds
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
[description-setter] Description set: ZOOKEEPER-3094
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8



###
## FAILED TESTS (if any) 
##
All tests passed

[GitHub] zookeeper issue #548: [ZOOKEEPER-3057] Fix IPv6 literal usage

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/548
  
+1 i'll kick jenkins


---


[GitHub] zookeeper pull request #555: ZOOKEEPER-3061: add more details to 'Unhandled ...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/555#discussion_r205669958
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/LearnerHandler.java ---
@@ -792,7 +792,14 @@ public boolean syncFollower(long peerLastZxid, 
ZKDatabase db, Leader leader) {
 txnProposalItr.close();
 }
 } else {
-LOG.warn("Unhandled scenario for peer sid: " +  getSid());
+LOG.warn("Unhandled scenario for peer sid: {} 
maxCommittedLog=0x{}"
--- End diff --

the logging levels are different, and it is nice to have the evaluation 
information with weird corner case scenario. i think it's worth surfacing the 
information here as well.


---


[GitHub] zookeeper issue #560: ZOOKEEPER-3082: Fix server snapshot behavior when out ...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/560
  
+1 i approve. thanx for handling the commit @hanm !


---


[GitHub] zookeeper pull request #563: ZOOKEEPER-3072: Throttle race condition fix

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/563#discussion_r205668951
  
--- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
@@ -1128,9 +1128,9 @@ public void processPacket(ServerCnxn cnxn, ByteBuffer 
incomingBuffer) throws IOE
 Record rsp = processSasl(incomingBuffer,cnxn);
 ReplyHeader rh = new ReplyHeader(h.getXid(), 0, 
KeeperException.Code.OK.intValue());
 cnxn.sendResponse(rh,rsp, "response"); // not sure about 
3rd arg..what is it?
-return;
--- End diff --

it would be nice to keep this return since it matches the handling of the 
other auth logic above.

it would also be nice if this was an

`} else if (h.getType() == OpCode.sasl) {`

clause and the
`}
else {`

was done outside of the if since all the other blocks will have returned. i 
think it makes the logic easier to follow.


---


Success: ZOOKEEPER- PreCommit Build #2003

2018-07-26 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2003/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 79.45 MB...]
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +0 tests included.  The patch appears to be a documentation 
patch that doesn't require tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2003//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2003//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2003//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=B70BDB69F84BB4D1DF50C1F0D8231D95.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 17 minutes 49 seconds
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
[description-setter] Description set: ZOOKEEPER-3094
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8



###
## FAILED TESTS (if any) 
##
All tests passed

[GitHub] zookeeper issue #565: ZOOKEEPER-3067: Optionally disable client environment ...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/565
  
+1 let's make this happen


---


[GitHub] zookeeper issue #566: ZOOKEEPER-3062: mention fsync.warningthresholdms in Fi...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/566
  
i agree with @maoling, logging it with every warning seems overkill. the 
rest of the change looks great though. are you ok with removing the extra words 
in the log message?


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205667420
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -102,6 +102,21 @@
 /** Maximum time we allow for elapsed fsync before WARNing */
 private final static long fsyncWarningThresholdMS;
 
+/**
+ * This parameter limit the size of each txnlog to a given limit (KB).
+ * It does not affect how often the system will take a snapshot 
[zookeeper.snapCount]
+ * We roll the txnlog when either of the two limits are reached.
+ * Also since we only roll the logs at transaction boundaries, actual 
file size can exceed
+ * this limit by the maximum size of a serialized transaction.
+ * The feature is disabled by default (-1)
+ */
+public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimitInKb";
--- End diff --

we should also add this property to the doc.


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205667343
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -102,6 +102,21 @@
 /** Maximum time we allow for elapsed fsync before WARNing */
 private final static long fsyncWarningThresholdMS;
 
+/**
+ * This parameter limit the size of each txnlog to a given limit (KB).
+ * It does not affect how often the system will take a snapshot 
[zookeeper.snapCount]
+ * We roll the txnlog when either of the two limits are reached.
+ * Also since we only roll the logs at transaction boundaries, actual 
file size can exceed
+ * this limit by the maximum size of a serialized transaction.
+ * The feature is disabled by default (-1)
+ */
+public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimitInKb";
--- End diff --

shouldn't it be txnLogSizeLimitInKb?


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205667305
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -102,6 +102,20 @@
 /** Maximum time we allow for elapsed fsync before WARNing */
 private final static long fsyncWarningThresholdMS;
 
+/**
+ * This parameter limit the size of each txnlog to a given limit (KB).
+ * It does not affect how often the system will take a snapshot
+ * [zookeeper.snapCount]
+ *
+ * The feature is disabled by default (-1)
+ */
+public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimit";
+
+/**
+ * The actual txnlog size limit in bytes.
+ */
+public static long logSizeLimit = -1;
+
--- End diff --

good points @maoling ! is there a reason these two variables should be 
public? it would be nice to make the variable have a similar name to the 
property.


---


[GitHub] zookeeper issue #573: ZOOKEEPER-3090 continue can be replaced with break

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/573
  
i'll kick it again and see if it works.



---


[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/579#discussion_r205666254
  
--- Diff: src/c/tests/zkServer.sh ---
@@ -77,7 +77,7 @@ fi
 
 if [ "x${base_dir}" == "x" ]
 then
-zk_base="../../"
+zk_base="../../../"
--- End diff --

and is it related to this change? ;)


---


[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/579#discussion_r205666234
  
--- Diff: src/c/tests/zkServer.sh ---
@@ -77,7 +77,7 @@ fi
 
 if [ "x${base_dir}" == "x" ]
 then
-zk_base="../../"
+zk_base="../../../"
--- End diff --

is this correct? how did this work before?


---


[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/579#discussion_r205666190
  
--- Diff: src/c/tests/TestClient.cc ---
@@ -325,7 +326,17 @@ class Zookeeper_simpleSystem : public 
CPPUNIT_NS::TestFixture
 CPPUNIT_ASSERT(zk != 0);
 CPPUNIT_ASSERT(ctx.waitForConnected(zk));
 }
-
+
+/* Checks that a non-existent host will not block the connection*/
+void testNonexistentHost() {
+  char hosts[] = "jimmy:,127.0.0.1:22181";
+  watchctx_t ctx;
--- End diff --

4 space indent


---


[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/579#discussion_r205666180
  
--- Diff: src/c/src/zookeeper.c ---
@@ -842,11 +842,16 @@ static int resolve_hosts(const zhandle_t *zh, const 
char *hosts_in, addrvec_t *a
 }
 
 freeaddrinfo(res0);
-
+next:
 host = strtok_r(0, ",", _last);
 }
 #endif
 }
+if (avec->count == 0) {
+  rc = ZSYSTEMERROR; // not a single host resolved
--- End diff --

4 space indent ;)


---


[GitHub] zookeeper issue #583: [ZOOKEEPER-3104] Fix data inconsistency due to NEWLEAD...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/583
  
@nkalmar i think fixing whitespace is good if it is in proximity of the 
code you are changing, which i think is the case in this diff.

the logic looks good to me! thanx @lvfangmin !

+1


---


[GitHub] zookeeper issue #584: ZOOKEEPER-3102: Potential race condition when create e...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/584
  
i'm not sure this is an issue. there is a single thread 
(FileRequestProcessor) that does all the mutations, so i don't think there is a 
race here. there might be a race in other places, but we need to validate that 
and write a test for it.


---


[jira] [Commented] (ZOOKEEPER-2251) Add Client side packet response timeout to avoid infinite wait.

2018-07-26 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559223#comment-16559223
 ] 

Hudson commented on ZOOKEEPER-2251:
---

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #122 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/122/])
ZOOKEEPER-2251: Add Client side packet response timeout to avoid (hanm: rev 
9f82798415351a20136ceb1640b1781723e51cc1)
* (add) src/java/test/org/apache/zookeeper/ClientRequestTimeoutTest.java
* (edit) zookeeper-docs/src/documentation/content/xdocs/zookeeperProgrammers.xml
* (edit) src/java/main/org/apache/zookeeper/ZooKeeper.java
* (edit) src/java/main/org/apache/zookeeper/client/ZKClientConfig.java
* (edit) src/java/main/org/apache/zookeeper/ClientCnxn.java
* (edit) src/java/main/org/apache/zookeeper/KeeperException.java


> Add Client side packet response timeout to avoid infinite wait.
> ---
>
> Key: ZOOKEEPER-2251
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2251
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: java client
>Affects Versions: 3.4.9, 3.5.2, 3.4.11
>Reporter: nijel
>Assignee: Mohammad Arshad
>Priority: Critical
>  Labels: fault, pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-2251-01.patch, ZOOKEEPER-2251-02.patch, 
> ZOOKEEPER-2251-03.patch, ZOOKEEPER-2251-04.patch
>
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> I came across one issue related to Client side packet response timeout In my 
> cluster many packet drops happened for some time.
> One observation is the zookeeper client got hanged. As per the thread dump it 
> is waiting for the response/ACK for the operation performed (synchronous API 
> used here).
> I am using 
> zookeeper.serverCnxnFactory=org.apache.zookeeper.server.NIOServerCnxnFactory
> Since only few packets missed there is no DISCONNECTED event occurred.
> Need add a "response time out" for the operations or packets.
> *Comments from [~rakeshr]*
> My observation about the problem:-
> * Can use tools like 'Wireshark' to simulate the artificial packet loss.
> * Assume there is only one packet in the 'outgoingQueue' and unfortunately 
> the server response packet lost. Now, client will enter into infinite 
> waiting. 
> https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/ClientCnxn.java#L1515
> * Probably we can discuss more about this problem and possible solutions(add 
> packet ACK timeout or another better approach) in the jira.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ZOOKEEPER-3097) Use Runnable instead of Thread for working items in WorkerService to improve the throughput of CommitProcessor

2018-07-26 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559222#comment-16559222
 ] 

Hudson commented on ZOOKEEPER-3097:
---

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #122 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/122/])
ZOOKEEPER-3097: Using Runnable instead of thread work items to improve (hanm: 
rev 75c652f45090f5309060ab7defb37f337d327d2c)
* (edit) src/java/main/org/apache/zookeeper/server/WorkerService.java


> Use Runnable instead of Thread for working items in WorkerService to improve 
> the throughput of CommitProcessor
> --
>
> Key: ZOOKEEPER-3097
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3097
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.6.0
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Minor
>  Labels: performance, pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CommitProcessor is using this to submit read/write tasks, each task is 
> initialized as a thread, which is heavy, change it to a lighter Runnable 
> object to avoid the overhead of initializing the thread, it shows promised 
> improvement in the CommitProcessor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ZOOKEEPER-3094) Make BufferSizeTest reliable

2018-07-26 Thread Hudson (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559224#comment-16559224
 ] 

Hudson commented on ZOOKEEPER-3094:
---

SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #122 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/122/])
ZOOKEEPER-3094: Make BufferSizeTest reliable (hanm: rev 
7b7c6587733dba3c9f3862a034b354d067e0dc47)
* (edit) src/java/test/org/apache/zookeeper/test/BufferSizeTest.java


> Make BufferSizeTest reliable
> 
>
> Key: ZOOKEEPER-3094
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3094
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: tests
>Affects Versions: 3.4.0
>Reporter: Mohamed Jeelani
>Assignee: Mohamed Jeelani
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5, 3.4.14
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Improve reliability of BufferSizeTest. 
> Changes made to the testStartupFailure test to remember the old directory and 
> switch back to it after the test has completed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper issue #585: Zookeeper 3105:Character coding problem occur when cre...

2018-07-26 Thread breed
Github user breed commented on the issue:

https://github.com/apache/zookeeper/pull/585
  
wow! what's going on with this patch? it's huge?


---


[GitHub] zookeeper pull request #545: ZOOKEEPER-2261 When only secureClientPort is co...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/545#discussion_r205663866
  
--- Diff: 
src/java/test/org/apache/zookeeper/server/persistence/UtilTest.java ---
@@ -0,0 +1,91 @@
+/**
--- End diff --

did you mean for this file to be part of the patch?


---


[GitHub] zookeeper pull request #545: ZOOKEEPER-2261 When only secureClientPort is co...

2018-07-26 Thread breed
Github user breed commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/545#discussion_r205663822
  
--- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
@@ -866,6 +866,9 @@ public void setServerCnxnFactory(ServerCnxnFactory 
factory) {
 }
 
 public ServerCnxnFactory getServerCnxnFactory() {
+if (secureServerCnxnFactory != null) {
+return secureServerCnxnFactory;
+}
 return serverCnxnFactory;
 }
 
--- End diff --

i don't feel strongly about it, but i like @hanm 's idea.


---


[GitHub] zookeeper pull request #545: ZOOKEEPER-2261 When only secureClientPort is co...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/545#discussion_r205662651
  
--- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java ---
@@ -866,6 +866,9 @@ public void setServerCnxnFactory(ServerCnxnFactory 
factory) {
 }
 
 public ServerCnxnFactory getServerCnxnFactory() {
+if (secureServerCnxnFactory != null) {
+return secureServerCnxnFactory;
+}
 return serverCnxnFactory;
 }
 
--- End diff --

Would it be better to, instead of mix `secureServerCnxnFactory` in 
`getServerCnxnFactory`, add a separate method `getSecureServerCnxnFactory`? 
This also maps well with existing set method `setSecureServerCnxnFactory`. 
Caller now has to explicitly call both, which is more work, but makes semantics 
more clear. 


---


ZooKeeper_branch34_openjdk8 - Build # 1 - Failure

2018-07-26 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch34_openjdk8/1/

###
## LAST 60 LINES OF THE CONSOLE 
###
Started by user phunt
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-2 (ubuntu trusty) in workspace 
/home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk8
[WS-CLEANUP] Deleting project workspace...
Cloning the remote Git repository
Cloning repository git://git.apache.org/zookeeper.git
 > git init /home/jenkins/jenkins-slave/workspace/ZooKeeper_branch34_openjdk8 # 
 > timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git --version # timeout=10
 > git fetch --tags --progress git://git.apache.org/zookeeper.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url git://git.apache.org/zookeeper.git # timeout=10
Cleaning workspace
 > git rev-parse --verify HEAD # timeout=10
No valid HEAD. Skipping the resetting
 > git clean -fdx # timeout=10
Fetching upstream changes from git://git.apache.org/zookeeper.git
 > git fetch --tags --progress git://git.apache.org/zookeeper.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/branch-3.4^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/branch-3.4^{commit} # timeout=10
Checking out Revision fc346f2a0ce2df0a50eb601d7617d8dd6a7e6e69 
(refs/remotes/origin/branch-3.4)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fc346f2a0ce2df0a50eb601d7617d8dd6a7e6e69
Commit message: "ZOOKEEPER-3009: fix the related bugs in branch-3.4"
First time build. Skipping changelog.
No emails were triggered.
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
[ZooKeeper_branch34_openjdk8] $ 
/home/jenkins/tools/ant/apache-ant-1.9.7/bin/ant -Dtest.junit.maxmem=2g 
-Dtest.output=no -Dtest.junit.threads=8 -Dtest.junit.output.format=xml 
-Djavac.target=1.8 clean test-core-java
Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/lib/jvm/java-8-openjdk-amd64//bin/java
Build step 'Invoke Ant' marked build as failure
Archiving artifacts
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Recording test results
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Setting OPENJDK_8_ON_UBUNTU_ONLY__HOME=/usr/lib/jvm/java-8-openjdk-amd64/



###
## FAILED TESTS (if any) 
##
No tests ran.

[GitHub] zookeeper issue #577: [ZOOKEEPER-3094] Make BufferSizeTest reliable

2018-07-26 Thread mjeelanimsft
Github user mjeelanimsft commented on the issue:

https://github.com/apache/zookeeper/pull/577
  
Thanks for accepting and merging @hanm !


---


[jira] [Commented] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread maoling (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559204#comment-16559204
 ] 

maoling commented on ZOOKEEPER-3105:


[~lordofkey]

sorry I test it with python2.will test with python3 later.

some problem with PR-585.The contributor guide is 
[here]([https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute])]

BTW,you can try to use *kazoo* when python3 don't work(:D)

> Character coding problem occur when create a node using python3
> ---
>
> Key: ZOOKEEPER-3105
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: contrib
>Affects Versions: 3.5.0
> Environment: linux
>Reporter: yang hao
>Priority: Major
> Fix For: 3.5.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> when creating a node using python3,  InvalidACLException occurs all the time. 
> it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Success: ZOOKEEPER- PreCommit Build #2002

2018-07-26 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2002/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 77.93 MB...]
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +0 tests included.  The patch appears to be a documentation 
patch that doesn't require tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
 [exec] 
 [exec] +1 core tests.  The patch passed core unit tests.
 [exec] 
 [exec] +1 contrib tests.  The patch passed contrib unit tests.
 [exec] 
 [exec] Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2002//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2002//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2002//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] 
 [exec] Error: No value specified for option "issue"
 [exec] Session logged out. Session was 
JSESSIONID=F198A3E38CFA07490312E31DB52181AB.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Finished build.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] mv: 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 and 
'/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/patchprocess'
 are the same file

BUILD SUCCESSFUL
Total time: 16 minutes 57 seconds
Archiving artifacts
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Recording test results
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
[description-setter] Description set: ZOOKEEPER-2251
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Email was triggered for: Success
Sending email for trigger: Success
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8
Setting JDK_1_8_LATEST__HOME=/home/jenkins/tools/java/latest1.8



###
## FAILED TESTS (if any) 
##
All tests passed

[GitHub] zookeeper pull request #560: ZOOKEEPER-3082: Fix server snapshot behavior wh...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/560#discussion_r205659448
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java ---
@@ -399,8 +399,30 @@ public void save(DataTree dataTree,
 File snapshotFile = new File(snapDir, 
Util.makeSnapshotName(lastZxid));
 LOG.info("Snapshotting: 0x{} to {}", Long.toHexString(lastZxid),
 snapshotFile);
-snapLog.serialize(dataTree, sessionsWithTimeouts, snapshotFile, 
syncSnap);
-
+try {
+snapLog.serialize(dataTree, sessionsWithTimeouts, 
snapshotFile, syncSnap);
+} catch (IOException e) {
+if (snapshotFile.length() == 0) {
--- End diff --

>> If that sounds reasonable, I'd propose that we commit on this patch and 
close the hole created from this particular issue

SGTM. @breed - ok with you? If so I'll commit this.


---


[GitHub] zookeeper issue #577: [ZOOKEEPER-3094] Make BufferSizeTest reliable

2018-07-26 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/577
  
committed to 3.4, 3.5, 3.6. thanks @mjeelanimsft ! 


---


[jira] [Updated] (ZOOKEEPER-3094) Make BufferSizeTest reliable

2018-07-26 Thread Michael Han (JIRA)


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

Michael Han updated ZOOKEEPER-3094:
---
Fix Version/s: 3.4.14

> Make BufferSizeTest reliable
> 
>
> Key: ZOOKEEPER-3094
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3094
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: tests
>Affects Versions: 3.4.0
>Reporter: Mohamed Jeelani
>Assignee: Mohamed Jeelani
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5, 3.4.14
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Improve reliability of BufferSizeTest. 
> Changes made to the testStartupFailure test to remember the old directory and 
> switch back to it after the test has completed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (ZOOKEEPER-3094) Make BufferSizeTest reliable

2018-07-26 Thread Michael Han (JIRA)


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

Michael Han resolved ZOOKEEPER-3094.

   Resolution: Fixed
Fix Version/s: 3.5.5

Issue resolved by pull request 577
[https://github.com/apache/zookeeper/pull/577]

> Make BufferSizeTest reliable
> 
>
> Key: ZOOKEEPER-3094
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3094
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: tests
>Affects Versions: 3.4.0
>Reporter: Mohamed Jeelani
>Assignee: Mohamed Jeelani
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Improve reliability of BufferSizeTest. 
> Changes made to the testStartupFailure test to remember the old directory and 
> switch back to it after the test has completed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper pull request #577: [ZOOKEEPER-3094] Make BufferSizeTest reliable

2018-07-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/577


---


[GitHub] zookeeper pull request #544: ZOOKEEPER-3009 : fix the related bugs in branch...

2018-07-26 Thread lujiefsi
Github user lujiefsi closed the pull request at:

https://github.com/apache/zookeeper/pull/544


---


[GitHub] zookeeper issue #544: ZOOKEEPER-3009 : fix the related bugs in branch-3.4

2018-07-26 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/544
  
committed to 3.4, thanks @lujiefsi !
Please close this pull request.


---


[jira] [Updated] (ZOOKEEPER-3009) Potential NPE in NIOServerCnxnFactory

2018-07-26 Thread Michael Han (JIRA)


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

Michael Han updated ZOOKEEPER-3009:
---
Fix Version/s: 3.4.14

> Potential NPE in NIOServerCnxnFactory
> -
>
> Key: ZOOKEEPER-3009
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3009
> Project: ZooKeeper
>  Issue Type: Bug
>Affects Versions: 3.6.0, 3.4.12
>Reporter: lujie
>Assignee: lujie
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5, 3.4.14
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Inspired by ZK-3006 , I develop a simple static analysis tool to find other 
> Potential NPE like ZK-3006. This bug is found by this tool ,and I have 
> carefully studied it.  But i am a newbie at here so i may be wrong, hope 
> someone could confirm it and help me improve this tool.
> h2. Bug description:
>  class NIOServerCnxn has three method 
> :getSocketAddress,getRemoteSocketAddress can return null just like :
> {code:java}
> // code placeholder
> if (sock.isOpen() == false) {
>   return null;
> }
> {code}
> some of their caller give null checker, some(total 3 list in below) are not. 
> {code:java}
> // ServerCnxn#getConnectionInfo
> Map info = new LinkedHashMap();
> info.put("remote_socket_address", getRemoteSocketAddress());// Map.put will 
> throw NPE if parameter is null
> //IPAuthenticationProvider#handleAuthentication
> tring id = cnxn.getRemoteSocketAddress().getAddress().getHostAddress();
> cnxn.addAuthInfo(new Id(getScheme(), id));// finally call Set.add(it will 
> throw NPE if parameter is null )
> //NIOServerCnxnFactory#addCnxn
> InetAddress addr = cnxn.getSocketAddress();
> Set set = ipMap.get(addr);// Map.get will throw NPE if 
> parameter is null{code}
> I think we should add null check in above three caller .
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper issue #119: ZOOKEEPER-2251:Add Client side packet response timeout...

2018-07-26 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/119
  
committed to 3.6/3.5. thanks @arshadmohammad !


---


[GitHub] zookeeper pull request #119: ZOOKEEPER-2251:Add Client side packet response ...

2018-07-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/119


---


[GitHub] zookeeper issue #578: [ZOOKEEPER-3097] Using Runnable instead of thread work...

2018-07-26 Thread hanm
Github user hanm commented on the issue:

https://github.com/apache/zookeeper/pull/578
  
committed to 3.6/3.5. thanks @lvfangmin !


---


[jira] [Resolved] (ZOOKEEPER-3097) Use Runnable instead of Thread for working items in WorkerService to improve the throughput of CommitProcessor

2018-07-26 Thread Michael Han (JIRA)


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

Michael Han resolved ZOOKEEPER-3097.

   Resolution: Fixed
Fix Version/s: 3.5.5

Issue resolved by pull request 578
[https://github.com/apache/zookeeper/pull/578]

> Use Runnable instead of Thread for working items in WorkerService to improve 
> the throughput of CommitProcessor
> --
>
> Key: ZOOKEEPER-3097
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3097
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.6.0
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Minor
>  Labels: performance, pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> CommitProcessor is using this to submit read/write tasks, each task is 
> initialized as a thread, which is heavy, change it to a lighter Runnable 
> object to avoid the overhead of initializing the thread, it shows promised 
> improvement in the CommitProcessor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper pull request #578: [ZOOKEEPER-3097] Using Runnable instead of thre...

2018-07-26 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zookeeper/pull/578


---


[jira] [Commented] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread yang hao (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16559123#comment-16559123
 ] 

yang hao commented on ZOOKEEPER-3105:
-

[~maoling]

do you test it on python3?

in my test, python2 is ok, and the error allways occurs in python3. in python3 
there is no type of ASCII string

the solution has been pushed on github 
[https://github.com/apache/zookeeper/pull/585]  

> Character coding problem occur when create a node using python3
> ---
>
> Key: ZOOKEEPER-3105
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: contrib
>Affects Versions: 3.5.0
> Environment: linux
>Reporter: yang hao
>Priority: Major
> Fix For: 3.5.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> when creating a node using python3,  InvalidACLException occurs all the time. 
> it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


ZooKeeper-trunk - Build # 120 - Failure

2018-07-26 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/120/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 142.77 KB...]
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest in thread 
6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.405 sec, Thread: 6, Class: org.apache.zookeeper.test.SessionInvalidationTest
[junit] Running org.apache.zookeeper.test.SessionTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.509 sec, Thread: 8, Class: org.apache.zookeeper.test.ServerCnxnTest
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest in thread 8
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.553 sec, Thread: 8, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
8
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.1 
sec, Thread: 8, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
147.045 sec, Thread: 3, Class: org.apache.zookeeper.test.RecoveryTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
13.918 sec, Thread: 6, Class: org.apache.zookeeper.test.SessionTest
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 3
[junit] Running org.apache.zookeeper.test.StatTest in thread 6
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.385 sec, Thread: 6, Class: org.apache.zookeeper.test.StatTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.899 sec, Thread: 3, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 3
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.094 sec, Thread: 3, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.036 sec, Thread: 3, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.18 sec, Thread: 6, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 3
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 6
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
25.542 sec, Thread: 8, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 8
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.117 sec, Thread: 8, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
91.061 sec, Thread: 1, Class: org.apache.zookeeper.test.RestoreCommittedLogTest
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 1
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
14.403 sec, Thread: 3, Class: org.apache.zookeeper.test.TruncateTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 3
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.094 sec, Thread: 3, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 3
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
4.463 sec, Thread: 8, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.491 sec, Thread: 8, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
23.538 sec, Thread: 6, Class: 
org.apache.zookeeper.test.WatchEventWhenAutoResetTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
21.48 sec, Thread: 3, Class: org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
33.506 sec, Thread: 1, Class: org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
297.468 sec, Thread: 5, Class: org.apache.zookeeper.test.ReconfigTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
621.16 

[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205636550
  
--- Diff: src/java/main/org/apache/zookeeper/server/SessionTracker.java ---
@@ -47,21 +47,20 @@
 long createSession(int sessionTimeout);
 
 /**
- * Add a global session to those being tracked.
+ * Track the session expire, not add to ZkDb.
  * @param id sessionId
  * @param to sessionTimeout
  * @return whether the session was newly added (if false, already 
existed)
  */
-boolean addGlobalSession(long id, int to);
+boolean trackSession(long id, int to);
--- End diff --

Is `trackSession` now only tracking global sessions? 


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205630231
  
--- Diff: src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java 
---
@@ -280,6 +275,11 @@ public synchronized boolean addSession(long id, int 
sessionTimeout) {
 return added;
 }
 
+public synchronized boolean commitSession(long id, int sessionTimeout) 
{
+sessionsWithTimeout.put(id, sessionTimeout);
+return true;
--- End diff --

Should we make this `void commitSession` given this always returns true?


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205636796
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/LearnerSessionTracker.java ---
@@ -101,33 +100,44 @@ public boolean isGlobalSession(long sessionId) {
 return globalSessionsWithTimeouts.containsKey(sessionId);
 }
 
-public boolean addGlobalSession(long sessionId, int sessionTimeout) {
+public boolean trackSession(long sessionId, int sessionTimeout) {
+// Learner doesn't track global session, do nothing here
+return false;
+}
+
+/**
+ * Synchronized on this to avoid race condition of adding a local 
session
+ * after committed global session, which may cause the same session 
being
+ * tracked on this server and leader.
+ */
+public synchronized boolean commitSession(
+long sessionId, int sessionTimeout) {
 boolean added =
 globalSessionsWithTimeouts.put(sessionId, sessionTimeout) == 
null;
-if (localSessionsEnabled && added) {
+
+if (added) {
 // Only do extra logging so we know what kind of session this 
is
 // if we're supporting both kinds of sessions
-LOG.info("Adding global session 0x" + 
Long.toHexString(sessionId));
+LOG.info("Committing global session 0x" + 
Long.toHexString(sessionId));
 }
-touchTable.get().put(sessionId, sessionTimeout);
-return added;
-}
 
-public boolean addSession(long sessionId, int sessionTimeout) {
--- End diff --

Here a similar question as asked in `LeaderSessionTracker`: with this being 
removed how would `LearnerSessionTracker` track a local session? The 
`trackSession` here as commented, just return false and I don't see any way of 
adding a local session to `LearnerSessionTracker`.


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205629046
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/LeaderSessionTracker.java ---
@@ -85,31 +85,43 @@ public boolean isGlobalSession(long sessionId) {
 return globalSessionTracker.isTrackingSession(sessionId);
 }
 
-public boolean addGlobalSession(long sessionId, int sessionTimeout) {
-boolean added =
-globalSessionTracker.addSession(sessionId, sessionTimeout);
-if (localSessionsEnabled && added) {
+public boolean trackSession(long sessionId, int sessionTimeout) {
+boolean tracked =
+globalSessionTracker.trackSession(sessionId, sessionTimeout);
+if (localSessionsEnabled && tracked) {
 // Only do extra logging so we know what kind of session this 
is
 // if we're supporting both kinds of sessions
-LOG.info("Adding global session 0x" + 
Long.toHexString(sessionId));
+LOG.info("Tracking global session 0x" + 
Long.toHexString(sessionId));
 }
-return added;
+return tracked;
 }
 
-public boolean addSession(long sessionId, int sessionTimeout) {
-boolean added;
-if (localSessionsEnabled && !isGlobalSession(sessionId)) {
-added = localSessionTracker.addSession(sessionId, 
sessionTimeout);
--- End diff --

With this being removed, how would a `LeaderSessionTracker` now add (or 
track, with the new term) a new local session (when local session is enabled on 
Leader server)? The `LeaderSessionTracker.trackSession` does not track local 
session.


---


[jira] [Commented] (ZOOKEEPER-3036) Unexpected exception in zookeeper

2018-07-26 Thread Kevin Lu (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558929#comment-16558929
 ] 

Kevin Lu commented on ZOOKEEPER-3036:
-

[~o...@coralogix.com] did you get this resolved? We ran into this issue too, 
and there was a zookeeper IP in our ensemble that was down. We removed the 
downed zookeeper IP from the ensemble, did a rolling restart of the zookeeper 
cluster, and it seems to have fixed it so far... 

 

Additionally, see https://issues.apache.org/jira/browse/KAFKA-5642 as this was 
related in our case.

> Unexpected exception in zookeeper
> -
>
> Key: ZOOKEEPER-3036
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3036
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: jmx
>Affects Versions: 3.4.10
> Environment: 3 Zookeepers, 5 kafka servers
>Reporter: Oded
>Priority: Critical
>
> We got an issue with one of the zookeeprs (Leader), causing the entire kafka 
> cluster to fail:
> 2018-05-09 02:29:01,730 [myid:3] - ERROR 
> [LearnerHandler-/192.168.0.91:42490:LearnerHandler@648] - Unexpected 
> exception causing shutdown while sock still open
> java.net.SocketTimeoutException: Read timed out
>     at java.net.SocketInputStream.socketRead0(Native Method)
>     at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
>     at java.net.SocketInputStream.read(SocketInputStream.java:171)
>     at java.net.SocketInputStream.read(SocketInputStream.java:141)
>     at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
>     at java.io.BufferedInputStream.read(BufferedInputStream.java:265)
>     at java.io.DataInputStream.readInt(DataInputStream.java:387)
>     at 
> org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
>     at 
> org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:83)
>     at 
> org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:99)
>     at 
> org.apache.zookeeper.server.quorum.LearnerHandler.run(LearnerHandler.java:559)
> 2018-05-09 02:29:01,730 [myid:3] - WARN  
> [LearnerHandler-/192.168.0.91:42490:LearnerHandler@661] - *** GOODBYE 
> /192.168.0.91:42490 
>  
> We would expect that zookeeper will choose another Leader and the Kafka 
> cluster will continue to work as expected, but that was not the case.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread maoling
Github user maoling commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205526853
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -102,6 +102,20 @@
 /** Maximum time we allow for elapsed fsync before WARNing */
 private final static long fsyncWarningThresholdMS;
 
+/**
+ * This parameter limit the size of each txnlog to a given limit (KB).
+ * It does not affect how often the system will take a snapshot
+ * [zookeeper.snapCount]
+ *
+ * The feature is disabled by default (-1)
+ */
+public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimit";
+
+/**
+ * The actual txnlog size limit in bytes.
+ */
+public static long logSizeLimit = -1;
+
--- End diff --

private? txnLogSizeLimit is better?


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread maoling
Github user maoling commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205525593
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -109,7 +109,7 @@
  *
  * The feature is disabled by default (-1)
  */
-public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimit";
+public static final String LOG_SIZE_LIMIT = 
"zookeeper.txnlogSizeLimitInKb";
--- End diff --

private?


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread maoling
Github user maoling commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205527457
  
--- Diff: src/java/test/org/apache/zookeeper/test/TxnLogSizeLimitTest.java 
---
@@ -0,0 +1,173 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.zookeeper.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Random;
+
+import org.apache.log4j.Logger;
+import org.apache.zookeeper.CreateMode;
+import org.apache.zookeeper.PortAssignment;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZKTestCase;
+import org.apache.zookeeper.ZooDefs.Ids;
+import org.apache.zookeeper.ZooKeeper;
+import org.apache.zookeeper.data.Stat;
+import org.apache.zookeeper.proto.CreateRequest;
+import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.apache.zookeeper.server.ZKDatabase;
+import org.apache.zookeeper.server.ZooKeeperServer;
+import org.apache.zookeeper.server.persistence.FileTxnLog;
+import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
+import org.apache.zookeeper.txn.TxnHeader;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test loading committed proposal from txnlog. Learner uses these 
proposals to
+ * catch-up with leader
+ */
+public class TxnLogSizeLimitTest extends ZKTestCase implements Watcher {
+private static final Logger LOG = Logger
--- End diff --

the unit tests in the `TxnLogSizeLimitTest` can be moved to 
`FileTxnLogTest`?


---


[GitHub] zookeeper pull request #567: ZOOKEEPER-3071: Add a config parameter to contr...

2018-07-26 Thread maoling
Github user maoling commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/567#discussion_r205526028
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -127,14 +127,11 @@
 
 Long logSize = Long.getLong(LOG_SIZE_LIMIT, -1);
 if (logSize > 0) {
+LOG.info("{} = {}", LOG_SIZE_LIMIT, logSize);
+
--- End diff --

{} value is {} Bytes


---


[jira] [Commented] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread maoling (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558498#comment-16558498
 ] 

maoling commented on ZOOKEEPER-3105:


[~lordofkey]

It's a zkpython snippet which cannot reproduce this error after I test.

The validity of ACL parameters (e.g. must be an ASCII string) should be checked 
in your client side.

 

> Character coding problem occur when create a node using python3
> ---
>
> Key: ZOOKEEPER-3105
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: contrib
>Affects Versions: 3.5.0
> Environment: linux
>Reporter: yang hao
>Priority: Major
> Fix For: 3.5.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> when creating a node using python3,  InvalidACLException occurs all the time. 
> it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper issue #583: [ZOOKEEPER-3104] Fix data inconsistency due to NEWLEAD...

2018-07-26 Thread maoling
Github user maoling commented on the issue:

https://github.com/apache/zookeeper/pull/583
  
@lvfangmin discard your vim,embrace IEDA(smirk)


---


[GitHub] zookeeper issue #583: [ZOOKEEPER-3104] Fix data inconsistency due to NEWLEAD...

2018-07-26 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/583
  
@nkalmar I can remove the white space in this diff, it do looks much 
cleaner after we remove the space though. 

Do you know how often we need to ask people to format their code (remove 
the extra white space change, etc), maybe we should unify the format of coding 
and have a one time format to avoid this issue in the future.

Please use "Hide whitespace changes" when reviewing the code before I 
removed those white space change.


---


[jira] [Commented] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread yang hao (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558447#comment-16558447
 ] 

yang hao commented on ZOOKEEPER-3105:
-

{code:java}
import zookeeper

zk=zookeeper.init("localhost:2181")
stat, acl = zookeeper.get_acl(zk, "/")
zookeeper.create(zk, "/zk_imagesearch1", "fs", acl, 0)
{code}

> Character coding problem occur when create a node using python3
> ---
>
> Key: ZOOKEEPER-3105
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: contrib
>Affects Versions: 3.5.0
> Environment: linux
>Reporter: yang hao
>Priority: Major
> Fix For: 3.5.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> when creating a node using python3,  InvalidACLException occurs all the time. 
> it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] zookeeper pull request #585: Zookeeper 3105:Character coding problem occur w...

2018-07-26 Thread lordofkey
GitHub user lordofkey opened a pull request:

https://github.com/apache/zookeeper/pull/585

Zookeeper 3105:Character coding problem occur when create a node using 
python3

when creating a node using python3,  InvalidACLException occurs all the 
time. it`s caused by imcompatible way of parsing acl passed through python3 api.
so
```
acls->data[i].id.id = strdup( PyUnicode_AsUnicode( PyDict_GetItemString( a, 
"id" ) ) );
acls->data[i].id.scheme = strdup( PyUnicode_AsUnicode( 
PyDict_GetItemString( a, "scheme" ) ) );
```
is changed to
```
acls->data[i].id.id = strdup( PyBytes_AS_STRING( PyUnicode_AsASCIIString( 
PyDict_GetItemString( a, "id" ) ) ) );
acls->data[i].id.scheme = strdup( PyBytes_AS_STRING( 
PyUnicode_AsASCIIString( PyDict_GetItemString( a, "scheme" ) ) ) );

```
because `acls->data[i].id.id` and `acls->data[i].id.scheme` must be an 
ASCII string.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/lordofkey/zookeeper ZOOKEEPER-3105

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zookeeper/pull/585.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #585


commit e3e68b1d4ffaf1409e74a31eb3365ce20ff956a0
Author: Patrick D. Hunt 
Date:   2016-03-11T06:34:35Z

ZOOKEEPER-2133 zkperl: Segmentation fault if getting a node with null value 
(Botond Hejj via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734499 
13f79535-47bb-0310-9956-ffa450edef68

commit 3767a3fe7334d2d9aeae31b37442c3bb18ebc7eb
Author: Patrick D. Hunt 
Date:   2016-03-11T06:48:20Z

Added some CHANGES details that I missed in recent commits. (phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734502 
13f79535-47bb-0310-9956-ffa450edef68

commit 047936e69ef17b287588a79d0cdedf4d4fd1bffb
Author: Patrick D. Hunt 
Date:   2016-03-14T06:57:10Z

ZOOKEEPER-2283 traceFile property is not used in the ZooKeeper, it should 
be removed from documentation (Arshad Mohammad via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1734882 
13f79535-47bb-0310-9956-ffa450edef68

commit a7ceba25e34b61fbfa4efa79283c0d3196998272
Author: Patrick D. Hunt 
Date:   2016-03-15T16:05:11Z

ZOOKEEPER-2385 Zookeeper trunk build is failing on windows (Arshad Mohammad 
via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735121 
13f79535-47bb-0310-9956-ffa450edef68

commit 8e805005359766c52ef87d964de87696163f1a60
Author: Patrick D. Hunt 
Date:   2016-03-17T06:14:29Z

ZOOKEEPER-2388 Unit tests failing on Solaris (Arshad Mohammad via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735370 
13f79535-47bb-0310-9956-ffa450edef68

commit 0e7e076abbe70a87e31a62d98e21140d6da0a7f5
Author: Patrick D. Hunt 
Date:   2016-03-18T17:23:04Z

ZOOKEEPER-2392 Update netty to 3.7.1.Final (Hendy Irawan via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735648 
13f79535-47bb-0310-9956-ffa450edef68

commit 1b36ea943e209cc76b6930eb90b394958eb19a65
Author: Chris Nauroth 
Date:   2016-03-19T21:51:14Z

ZOOKEEPER-2393: Revert run-time dependency on log4j and slf4j-log4j12 
(Arshad Mohammad via cnauroth)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735822 
13f79535-47bb-0310-9956-ffa450edef68

commit 6de6e6c74e9f3492601f1d771f9e248555e47a02
Author: Patrick D. Hunt 
Date:   2016-03-20T04:28:02Z

ZOOKEEPER-2240 Make the three-node minimum more explicit in documentation 
and on website (Shawn Heisey and Arshad Mohammad via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735837 
13f79535-47bb-0310-9956-ffa450edef68

commit adcf1469a0851b09a3bd92a9657c9a49efb4ce68
Author: Patrick D. Hunt 
Date:   2016-03-20T18:34:57Z

ZOOKEEPER-2195 fsync.warningthresholdms in zoo.cfg not working (Biju Nair 
via phunt)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1735893 
13f79535-47bb-0310-9956-ffa450edef68

commit 8d8090f3274733db90e55c9412294ae02095ec4d
Author: Chris Nauroth 
Date:   2016-03-21T20:45:37Z

ZOOKEEPER-2364: "ant docs" fails on branch-3.5 due to missing 
releasenotes.xml. (phunt via cnauroth)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1736093 
13f79535-47bb-0310-9956-ffa450edef68

commit f2c863e8b026109732bf19d662ee91956f05ab5b
Author: Camille Fournier 
Date:   2016-03-22T23:36:42Z

ZOOKEEPER-2141. ACL cache in DataTree never removes entries
(Adam Milne-Smith via camille)

git-svn-id: 
https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.5@1736260 

[GitHub] zookeeper issue #545: ZOOKEEPER-2261 When only secureClientPort is configure...

2018-07-26 Thread anmolnar
Github user anmolnar commented on the issue:

https://github.com/apache/zookeeper/pull/545
  
@hanm ? @breed ? @phunt ?


---


[jira] [Commented] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread Edward Ribeiro (JIRA)


[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16558353#comment-16558353
 ] 

Edward Ribeiro commented on ZOOKEEPER-3105:
---

Could you please post a code snippet that reproduces this error?

Best,

Edward

> Character coding problem occur when create a node using python3
> ---
>
> Key: ZOOKEEPER-3105
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: contrib
>Affects Versions: 3.5.0
> Environment: linux
>Reporter: yang hao
>Priority: Major
> Fix For: 3.5.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> when creating a node using python3,  InvalidACLException occurs all the time. 
> it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ZOOKEEPER-3105) Character coding problem occur when create a node using python3

2018-07-26 Thread yang hao (JIRA)
yang hao created ZOOKEEPER-3105:
---

 Summary: Character coding problem occur when create a node using 
python3
 Key: ZOOKEEPER-3105
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3105
 Project: ZooKeeper
  Issue Type: Bug
  Components: contrib
Affects Versions: 3.5.0
 Environment: linux
Reporter: yang hao
 Fix For: 3.5.0


when creating a node using python3,  InvalidACLException occurs all the time. 
it`s caused by imcompatible way of parsing acl passed through python3 api.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


ZooKeeper_branch35_jdk8 - Build # 1058 - Failure

2018-07-26 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/1058/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 62.39 KB...]
[junit] Running org.apache.zookeeper.test.ServerCnxnTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.929 sec, Thread: 6, Class: org.apache.zookeeper.test.SaslSuperUserTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
73.499 sec, Thread: 3, Class: org.apache.zookeeper.test.QuorumZxidSyncTest
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest in thread 
6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.804 sec, Thread: 6, Class: org.apache.zookeeper.test.SessionInvalidationTest
[junit] Running org.apache.zookeeper.test.SessionTest in thread 3
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.662 sec, Thread: 8, Class: org.apache.zookeeper.test.ServerCnxnTest
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
8
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.167 sec, Thread: 8, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.424 sec, Thread: 6, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 8
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 6
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.931 sec, Thread: 6, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StatTest in thread 6
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.765 sec, Thread: 6, Class: org.apache.zookeeper.test.StatTest
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 6
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
12.896 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.063 sec, Thread: 3, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 3
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.155 sec, Thread: 6, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.124 sec, Thread: 3, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 6
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 3
[junit] Tests run: 14, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
96.179 sec, Thread: 7, Class: org.apache.zookeeper.test.QuorumTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 7
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.103 sec, Thread: 7, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 7
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.457 sec, Thread: 7, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 7
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
7.694 sec, Thread: 6, Class: org.apache.zookeeper.test.TruncateTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 6
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.182 sec, Thread: 6, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 6
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
33.32 sec, Thread: 8, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
12.528 sec, Thread: 6, Class: org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.025 sec, Thread: 8, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
23.353 sec, Thread: 3, Class: 
org.apache.zookeeper.test.WatchEventWhenAutoResetTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
31.813 sec, Thread: 7, Class: org.apache.zookeeper.test.WatcherTest

[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205331145
  
--- Diff: src/java/test/org/apache/zookeeper/test/ClientBase.java ---
@@ -72,7 +72,7 @@
 static final File BASETEST =
 new File(System.getProperty("build.test.dir", "build"));
 
-protected String hostPort = "127.0.0.1:" + PortAssignment.unique();
+public String hostPort = "127.0.0.1:" + PortAssignment.unique();
--- End diff --

I am not sure why this change is required. 


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205340787
  
--- Diff: src/java/main/org/apache/zookeeper/server/SessionTracker.java ---
@@ -47,21 +47,20 @@
 long createSession(int sessionTimeout);
 
 /**
- * Add a global session to those being tracked.
+ * Track the session expire, not add to ZkDb.
  * @param id sessionId
  * @param to sessionTimeout
  * @return whether the session was newly added (if false, already 
existed)
  */
-boolean addGlobalSession(long id, int to);
+boolean trackSession(long id, int to);
 
 /**
- * Add a session to those being tracked. The session is added as a 
local
- * session if they are enabled, otherwise as global.
+ * Add the session to the under layer storage.
  * @param id sessionId
  * @param to sessionTimeout
  * @return whether the session was newly added (if false, already 
existed)
--- End diff --

Similarly it'll be great if the comment on the return value here is updated.


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205331482
  
--- Diff: src/java/test/org/apache/zookeeper/test/QuorumBase.java ---
@@ -53,32 +53,32 @@
 protected int port3;
 protected int port4;
 protected int port5;
-
+
 protected int portLE1;
 protected int portLE2;
 protected int portLE3;
 protected int portLE4;
 protected int portLE5;
-
+
 protected int portClient1;
 protected int portClient2;
 protected int portClient3;
 protected int portClient4;
 protected int portClient5;
 
-protected boolean localSessionsEnabled = false;
-protected boolean localSessionsUpgradingEnabled = false;
+public boolean localSessionsEnabled = false;
+public boolean localSessionsUpgradingEnabled = false;
--- End diff --

Not sure why this change is required. 


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205332227
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/quorum/UpgradeableSessionTracker.java 
---
@@ -19,6 +19,8 @@
 
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.Set;
+import java.util.HashSet;
--- End diff --

Are both imports needed? I don't see any new data structure introduced. 


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205340493
  
--- Diff: src/java/main/org/apache/zookeeper/server/SessionTracker.java ---
@@ -47,21 +47,20 @@
 long createSession(int sessionTimeout);
 
 /**
- * Add a global session to those being tracked.
+ * Track the session expire, not add to ZkDb.
  * @param id sessionId
  * @param to sessionTimeout
  * @return whether the session was newly added (if false, already 
existed)
  */
-boolean addGlobalSession(long id, int to);
+boolean trackSession(long id, int to);
 
 /**
- * Add a session to those being tracked. The session is added as a 
local
- * session if they are enabled, otherwise as global.
+ * Add the session to the under layer storage.
--- End diff --

I think the comment here is a little bit confusing. `commitSession`itself 
does not directly add session to storage, it's the snapshot that does this. I 
think the comment should mention that this function will add the session to the 
zkDB, this also maps to the `trackSession` comment (which does not modify 
zkDB.). It would be great if a reader can instantly get what `commit` means 
here by just reading the comment.


---


[GitHub] zookeeper pull request #447: [ZOOKEEPER-2926] Fix potential data consistency...

2018-07-26 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/447#discussion_r205339992
  
--- Diff: src/java/main/org/apache/zookeeper/server/SessionTracker.java ---
@@ -47,21 +47,20 @@
 long createSession(int sessionTimeout);
 
 /**
- * Add a global session to those being tracked.
+ * Track the session expire, not add to ZkDb.
  * @param id sessionId
  * @param to sessionTimeout
  * @return whether the session was newly added (if false, already 
existed)
--- End diff --

This comment should be updated now with the function name change.


---