Re: MetricsProvider Plan

2018-09-12 Thread Michael Han
Sounds a good plan to me. Thanks Enrico.

Regarding 4lw - my opinion is we could just leave it as is and don't expose
any of the newly added metrics through 4lw endpoints. Instead, advocating
admin server end points which will be supported moving forward.

On Tue, Sep 11, 2018 at 7:41 AM, Enrico Olivelli 
wrote:

> Hi,
> I would like to share the plan for  the new "Pluggable metrics system for
> ZooKeeper" [1]
>
> Currently on master we have the MetricsProvider API and the management for
> the lifecycle of the MetricsProvider (start/stop/configuration).
>
> Next immediate steps, which can run concurrently:
> - Implement a first "provider" (Prometheus.io)
> - Integrate the code with the new system
>
> There is an ongoing activity from Facebook guys to back port all of the
> metrics they added in their private fork "Implement additional server
> metrics" [2]
>
> My proposal is to wait for the integration of [2] and then proceed with the
> integration with Metrics Providers.
> I think that it would be better that Allan Liu or Joseph (or some other guy
> from Facebook) drive this migration.
>
> In the meantime I will work on the implementation of the Prometheus
> provider
>
> An important point is to decide how to support 'legacy' 4lw commands, my
> idea would be to implement a "FourLettersWordsMetricsProvider" which
> collects data and serves metrics to the legacy endpoint.
>
> Thoughts ?
>
>
> [1] https://issues.apache.org/jira/browse/ZOOKEEPER-3092
> [2] https://github.com/apache/zookeeper/pull/580
>
> Enrico
>


[GitHub] zookeeper pull request #623: [ZOOKEEPER-3146] Limit the maximum client conne...

2018-09-12 Thread hanm
Github user hanm commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/623#discussion_r217260419
  
--- Diff: src/java/test/org/apache/zookeeper/test/ClientTest.java ---
@@ -506,7 +506,7 @@ private void performClientTest(boolean withWatcherObj)
 }
--- End diff --

This file is not changed, except white spaces. Should we revert it? 

A more general wish - is it possible to configure your editor such that it 
avoids rewriting white spaces (even technically your editor is correct in most 
cases)? 


---


[jira] [Commented] (ZOOKEEPER-3141) testLeaderElectionWithDisloyalVoter is flaky

2018-09-12 Thread Michael Han (JIRA)


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

Michael Han commented on ZOOKEEPER-3141:


The failure does not reproduce in my stress test job which just ran this single 
test (https://builds.apache.org/job/Zookeeper_UT_sTRESS/). It can be reproduced 
on nightly build on trunk. Likely caused by interference from another test 
case. 

> testLeaderElectionWithDisloyalVoter is flaky
> 
>
> Key: ZOOKEEPER-3141
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3141
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: leaderElection, server, tests
>Affects Versions: 3.6.0
>Reporter: Michael Han
>Priority: Major
>
> The unit test added in ZOOKEEPER-3109 turns out to be quite flaky.
> See 
> [https://builds.apache.org/job/zOOkeeper-Find-Flaky-Tests/511/artifact/report.html]
> Recent failure builds:
> [https://builds.apache.org/job/ZooKeeper-trunk//181] 
> [https://builds.apache.org/job/ZooKeeper-trunk//179] 
> [https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2123/testReport/junit/org.apache.zookeeper.server.quorum/QuorumPeerMainTest/testLeaderElectionWithDisloyalVoter_stillHasMajority/]
>  
>  
> Snapshot of the failure:
> {code:java}
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testLeaderElectionWithDisloyalVoter_stillHasMajority
> Error Message
> Server 0 should have joined quorum by now
> Stacktrace
> junit.framework.AssertionFailedError: Server 0 should have joined quorum by 
> now
>   at 
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testLeaderElection(QuorumPeerMainTest.java:1482)
>   at 
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testLeaderElectionWithDisloyalVoter_stillHasMajority(QuorumPeerMainTest.java:1431)
>   at 
> org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)
> {code}



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


[jira] [Commented] (ZOOKEEPER-2122) Impplement SSL support in the Zookeeper C client library

2018-09-12 Thread shuoshi (JIRA)


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

shuoshi commented on ZOOKEEPER-2122:


I'd like to add openssl into zk's c client to support linux and macos, since 
[~asamarna] seems already support windows, I think it's better to make my code 
for non win32 platform only.

> Impplement SSL support in the Zookeeper C client library
> 
>
> Key: ZOOKEEPER-2122
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2122
> Project: ZooKeeper
>  Issue Type: Sub-task
>  Components: c client
>Affects Versions: 3.5.0
>Reporter: Ashish Amarnath
>Assignee: Ashish Amarnath
>Priority: Trivial
>  Labels: build, security
> Fix For: 3.6.0, 3.5.5
>
>
> Implement SSL support in the Zookeeper C client library to work with the 
> secure server.



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


ZooKeeper-trunk - Build # 189 - Still Failing

2018-09-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/189/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 145.70 KB...]
[junit] Running org.apache.zookeeper.test.SessionTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.997 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionInvalidationTest
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.51 sec, Thread: 7, Class: org.apache.zookeeper.test.ServerCnxnTest
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
7
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.092 sec, Thread: 7, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.886 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 7
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.763 sec, Thread: 3, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StatTest in thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.643 sec, Thread: 3, Class: org.apache.zookeeper.test.StatTest
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 3
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.119 sec, Thread: 3, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.068 sec, Thread: 3, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
34.519 sec, Thread: 1, Class: org.apache.zookeeper.test.RestoreCommittedLogTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 3
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 1
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
13.358 sec, Thread: 8, Class: org.apache.zookeeper.test.SessionTest
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.977 sec, Thread: 3, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.156 sec, Thread: 3, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 3
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.663 sec, Thread: 3, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 3
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
12.135 sec, Thread: 1, Class: org.apache.zookeeper.test.TruncateTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 1
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.134 sec, Thread: 1, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 1
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
23.933 sec, Thread: 7, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 7
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.125 sec, Thread: 7, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Running org.apache.jute.BinaryInputArchiveTest in thread 7
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.088 sec, Thread: 7, Class: org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
24.665 sec, Thread: 8, Class: 
org.apache.zookeeper.test.WatchEventWhenAutoResetTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
14.128 sec, Thread: 1, Class: org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
32.593 sec, Thread: 3, Class: org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
426.283 sec, Thread: 5, Class: org.apache.zookeeper.test.DisconnectedWatcherTest
[junit] Tests run: 105, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
431.371 

Re: Java version (Oracle - OpenJDK) support

2018-09-12 Thread Patrick Hunt
Historically we've always defined a minimum version and let users decide.
That seems to have worked pretty well. It provides the most flexibility and
hasn't really bothered us too much. It limits our use of new language
features of Java, but typically Java is ensuring b/w compat from a runtime
perspective and as a result there's isn't much of a burden to say we
support 6 and laters vs alternately saying we support 6&8 exclusively.

Patrick

On Wed, Sep 12, 2018 at 7:16 AM Enrico Olivelli  wrote:

> Il mer 12 set 2018, 11:37 Norbert Kalmar  ha
> scritto:
>
> > Thanks Enrico!
> >
> > Agree, as I mentioned, only JDK8 and 11 should be tested on 3.4 and other
> > branches as well.
> >
> > I checked the Kerby problems, 3.4 does not have Kerby, it uses Apache
> > directory server.
> > Maybe we should introduce also introduce Kerby on 3.4? Or just try to fix
> > the problems with directory server.
> >
>
> Directory Server supports jdk6 and Kerby not.
> If wr drop JDK6 we  can switch to Kerby
>
> Enrico
>
>
>
> > Regards,
> > Norbert
> >
> > On Wed, Sep 12, 2018 at 11:22 AM Enrico Olivelli 
> > wrote:
> >
> > > Il giorno mer 12 set 2018 alle ore 11:04 Norbert Kalmar
> > >  ha scritto:
> > >
> > > > Hi all,
> > > >
> > > > Oracle8 will have it's support end in January. They changed there
> > release
> > > > drastically.
> > > > A good article on that:
> > > > https://dev.karakun.com/java/2018/06/25/java-releases.html
> > > >
> > > > Long story short: From January, no Oracle JDK version can be used in
> > PROD
> > > > environment without a license. End every release, even LTS (next one
> is
> > > > version 11) will only have a 6 month public update period.
> > > >
> > > > We should also decide on the supported versions of Java.
> > > >
> > > > My opinion: We should make sure ZK is compatible with Oracle 8 and
> 11,
> > > and
> > > > also openJDK 8 and 11.
> > > >
> > > > But after that, every 6 month, there will be a new Oracle Java
> version
> > > > which we should support.
> > > >
> > > > What do you think? What version to support? What about 3.4 now that
> 3.5
> > > is
> > > > getting close to stable? (I think fix 3.4 on Oracle 11 and that's it
> -
> > > 3.5
> > > > stable should be out by the time 12 comes out).
> > > >
> > >
> > > As far as I know ZK is running fine on JDK11, even 3.4.
> > > We have a problem with Kerberos tests on 3.4, but we can fix them.
> > >
> > >
> > > I can add that as far as I know there will not be any 'Oracle JDK 12"
> GA,
> > > but only OpenJDK will be released to GA from Oracle
> > >
> > >
> > > >
> > > > Once we have an agreement, we should create jira's to fix Java11
> > > problems.
> > > >
> > >
> > > Ok to me
> > >
> > > We can consider also dropping support for JDK6 on 3.4 branch, this is
> > > actually the problem
> > >
> > > Enrico
> > >
> > >
> > > > Regards,
> > > > Norbert
> > > >
> > >
> >
> --
>
>
> -- Enrico Olivelli
>


[jira] [Created] (ZOOKEEPER-3147) Enable server tracking client information

2018-09-12 Thread Michael Han (JIRA)
Michael Han created ZOOKEEPER-3147:
--

 Summary: Enable server tracking client information
 Key: ZOOKEEPER-3147
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3147
 Project: ZooKeeper
  Issue Type: Improvement
  Components: java client, server
Affects Versions: 3.6.0
Reporter: Michael Han
Assignee: Michael Han


We should consider add fine grained tracking information for clients and send 
these information to server side, which will be useful for debugging and in 
future multi-tenancy support / enforced quota.



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


[jira] [Commented] (ZOOKEEPER-3127) Fixing potential data inconsistency due to update last processed zxid with partial multi-op txn

2018-09-12 Thread Michael Han (JIRA)


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

Michael Han commented on ZOOKEEPER-3127:


If there is a conflict, it's expected that the author of the original PR create 
a new PR targeting the new branch. If there is no conflict then committer can 
cherry pick the patch to different branches. It's because the author has best 
knowledge of how to deal with the conflict regardless of it's trivial or not, 
plus a separate PR will test the patch again through precommit jenkins. I think 
this is consistent with what committers was doing in old days when 
contributions coming in as patches; it's expected the original author uploaded 
a new patch to Jira if there was a conflict. 

 

 

> Fixing potential data inconsistency due to update last processed zxid with 
> partial multi-op txn
> ---
>
> Key: ZOOKEEPER-3127
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3127
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Found this issue while checking the code for another issue, this is a 
> relatively rare case which we haven't seen it on prod so far.
> Currently, the lastProcessedZxid is updated when applying the first txn of 
> multi-op, if there is a snapshot in progress, it's possible that the zxid 
> associated with the snapshot only include partial of the multi op.
> When loading snapshot, it will only load the txns after the zxid associated 
> with snapshot file, which could data inconsistency due to missing sub txns.
> To avoid this, we only update the lastProcessedZxid when the whole multi-op 
> txn is applied to DataTree.



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


[jira] [Commented] (ZOOKEEPER-3127) Fixing potential data inconsistency due to update last processed zxid with partial multi-op txn

2018-09-12 Thread Fangmin Lv (JIRA)


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

Fangmin Lv commented on ZOOKEEPER-3127:
---

[~andorm] what's the process for committer to port back the commits? If it 
cannot be clearly applied we always needs a PR for that? Or if it's very 
trivial conflict, we just resolve it when CP and commit directly?

I manually cherry-picked this one on my MAC, there is a very minor conflict in 
QuorumPeerMainTest which is about the private/public of logStates method, I'll 
provide the PR, but I'm more interested to know what's  the procedure here.

> Fixing potential data inconsistency due to update last processed zxid with 
> partial multi-op txn
> ---
>
> Key: ZOOKEEPER-3127
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3127
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Found this issue while checking the code for another issue, this is a 
> relatively rare case which we haven't seen it on prod so far.
> Currently, the lastProcessedZxid is updated when applying the first txn of 
> multi-op, if there is a snapshot in progress, it's possible that the zxid 
> associated with the snapshot only include partial of the multi op.
> When loading snapshot, it will only load the txns after the zxid associated 
> with snapshot file, which could data inconsistency due to missing sub txns.
> To avoid this, we only update the lastProcessedZxid when the whole multi-op 
> txn is applied to DataTree.



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


Failed: ZOOKEEPER- PreCommit Build #2160

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 77.83 MB...]
 [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 failed 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/2160//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16612710 added to ZOOKEEPER-1260.
 [exec] Session logged out. Session was 
JSESSIONID=AFF42D3099A7EA6642355AE6FBC47FFE.
 [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 FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1842:
 exec returned: 1

Total time: 12 minutes 50 seconds
Build step 'Execute shell' marked build as failure
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-1260
Putting comment on the pull request
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: Failure - Any
Sending email for trigger: Failure - Any
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) 
##
2 tests failed.
FAILED:  org.apache.zookeeper.ClientRequestTimeoutTest.testClientRequestTimeout

Error Message:
KeeperErrorCode = ConnectionLoss for /clientHang3

Stack Trace:
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss for /clientHang3
at org.apache.zookeeper.KeeperException.create(KeeperException.java:102)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1459)
at 
org.apache.zookeeper.ClientRequestTimeoutTest.testClientRequestTimeout(ClientRequestTimeoutTest.java:100)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)


FAILED:  
org.apache.zookeeper.server.quorum.auth.QuorumKerberosHostBasedAuthTest.testConnectBadServer

Error Message:
waiting for server 1 being up

Stack Trace:
junit.framework.AssertionFailedError: waiting for server 1 being up
at 
org.apache.zookeeper.server.quorum.auth.QuorumAuthTestBase.startQuorum(QuorumAuthTestBase.java:74)
at 

[jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-1260:
--

-1 overall.  GitHub Pull Request  Build
  

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

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

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 3.0.1) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2160//console

This message is automatically generated.

> Audit logging in ZooKeeper servers.
> ---
>
> Key: ZOOKEEPER-1260
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Mahadev konar
>Assignee: Mohammad Arshad
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Lots of users have had questions on debugging which client changed what znode 
> and what updates went through a znode. We should add audit logging as in 
> Hadoop (look at Namenode Audit logging) to log which client changed what in 
> the zookeeper servers. This could just be a log4j audit logger.



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


[GitHub] zookeeper pull request #338: ZOOKEEPER-1260:Audit logging in ZooKeeper serve...

2018-09-12 Thread arshadmohammad
Github user arshadmohammad commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/338#discussion_r217179715
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java ---
@@ -465,6 +488,127 @@ public void processRequest(Request request) {
 }
 }
 
+private void addSuccessAudit(Request request, ServerCnxn cnxn, String 
op, String path) {
+addSuccessAudit(request, cnxn, op, path, null);
+}
+
+private void addSuccessAudit(Request request, ServerCnxn cnxn, String 
op, String path,
+String acl) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+ZKAuditLogger.logSuccess(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+
+private void addFailureAudit(Request request, ServerCnxn cnxn, String 
op, String path) {
+addFailureAudit(request, cnxn, op, path, null);
+}
+
+private void addFailureAudit(Request request, ServerCnxn cnxn, String 
op, String path,
+String acl) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+ZKAuditLogger.logFailure(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+
+private void addAuditLog(Request request, ServerCnxn cnxn, String op, 
String path, String acl,
+Code err) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+if (err == Code.OK) {
+ZKAuditLogger.logSuccess(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+} else {
+ZKAuditLogger.logFailure(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+}
+
+private String getACLs(Request request)
+{
+ByteBuffer reqData = request.request.duplicate();
+reqData.rewind();
+SetACLRequest setACLRequest = new SetACLRequest();
+try {
+ByteBufferInputStream.byteBuffer2Record(reqData, 
setACLRequest);
+} catch (IOException e) {
+e.printStackTrace();
+}
+return ZKUtil.aclToString(setACLRequest.getAcl());
+}
+
+private void addFailedTxnAduitLog(Request request) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+String op = AuditConstants.OP_CREATE;
+String path=null;
+long sessionId = -1;
+String address = null;
+String acls = null;
+ByteBuffer reqData = request.request.duplicate();
+reqData.rewind();
+try {
+sessionId = request.cnxn.getSessionId();
+switch (request.type) {
+case OpCode.create:
+case  OpCode.create2:
+case  OpCode.createContainer:
+op = AuditConstants.OP_CREATE;
+CreateRequest createRequest = new CreateRequest();
+ByteBufferInputStream.byteBuffer2Record(reqData, 
createRequest);
+path=createRequest.getPath();
+break;
+case OpCode.delete:
+case OpCode.deleteContainer:
+op = AuditConstants.OP_DELETE;
+//path = new String(request.request.array());
--- End diff --

removed


---


[GitHub] zookeeper pull request #338: ZOOKEEPER-1260:Audit logging in ZooKeeper serve...

2018-09-12 Thread arshadmohammad
Github user arshadmohammad commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/338#discussion_r217179644
  
--- Diff: src/java/main/org/apache/zookeeper/audit/ZKAuditLogger.java ---
@@ -0,0 +1,117 @@
+/**
+ * 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.audit;
+
+import org.apache.zookeeper.server.ServerCnxnFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ZKAuditLogger {
+public static final String SYSPROP_AUDIT_ENABLED = 
"zookeeper.audit.enabled";
+private static final Logger LOG = 
LoggerFactory.getLogger(ZKAuditLogger.class);
+// By default audit logging is disabled
+public static final boolean isAuditEnabled = 
Boolean.getBoolean(SYSPROP_AUDIT_ENABLED);
+
+/**
+ *
+ * Prints audit log based on log level specified
+ *
+ */
+public static enum LogLevel {
+ERROR {
+@Override
+public void printLog(String logMsg) {
+LOG.error(logMsg);
+}
+},
+INFO {
+@Override
+public void printLog(String logMsg) {
+LOG.info(logMsg);
+}
+};
+public abstract void printLog(String logMsg);
+}
+
+public static enum Keys {
+USER, OPERATION, RESULT, IP, ACL, ZNODE, SESSION;
+}
+
+public static void logInvoked(String user, String operation) {
+log(LogLevel.INFO, user, operation, AuditConstants.INVOKED);
+}
+
+public static void logSuccess(String user, String operation) {
+log(LogLevel.INFO, user, operation, AuditConstants.SUCCESS);
+}
+
+public static void logFailure(String user, String operation) {
+log(LogLevel.ERROR, user, operation, AuditConstants.FAILURE);
+}
+
+private static void log(LogLevel level, String user, String operation, 
String logType) {
+level.printLog(createLog(user, operation, null, null, null, null, 
logType));
+}
+
+public static void logSuccess(String user, String operation, String 
znode, String acl, String session, String ip) {
+LogLevel.INFO.printLog(createLog(user, operation, znode, acl, 
session, ip, AuditConstants.SUCCESS));
+}
+
+public static void logFailure(String user, String operation, String 
znode, String acl, String session, String ip) {
+LogLevel.ERROR.printLog(createLog(user, operation, znode, acl, 
session, ip, AuditConstants.FAILURE));
+}
+
+/**
+ * A helper api for creating an audit log string.
+ */
+public static String createLog(String user, String operation, String 
znode, String acl, String session, String ip,
+String status) {
+ZKAuditLogFormatter fmt = new ZKAuditLogFormatter();
--- End diff --

ZKAuditLogFormatter is not putting info for which value is null. I think we 
can not do with String.format()


---


[GitHub] zookeeper pull request #338: ZOOKEEPER-1260:Audit logging in ZooKeeper serve...

2018-09-12 Thread arshadmohammad
Github user arshadmohammad commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/338#discussion_r217179296
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java ---
@@ -465,6 +488,127 @@ public void processRequest(Request request) {
 }
 }
 
+private void addSuccessAudit(Request request, ServerCnxn cnxn, String 
op, String path) {
+addSuccessAudit(request, cnxn, op, path, null);
+}
+
+private void addSuccessAudit(Request request, ServerCnxn cnxn, String 
op, String path,
+String acl) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+ZKAuditLogger.logSuccess(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+
+private void addFailureAudit(Request request, ServerCnxn cnxn, String 
op, String path) {
+addFailureAudit(request, cnxn, op, path, null);
+}
+
+private void addFailureAudit(Request request, ServerCnxn cnxn, String 
op, String path,
+String acl) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+ZKAuditLogger.logFailure(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+
+private void addAuditLog(Request request, ServerCnxn cnxn, String op, 
String path, String acl,
+Code err) {
+if (!ZKAuditLogger.isAuditEnabled) {
+return;
+}
+if (err == Code.OK) {
+ZKAuditLogger.logSuccess(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+} else {
+ZKAuditLogger.logFailure(request.getUsers(), op, path, acl, 
cnxn.getSessionIdHex(),
+cnxn.getHostAddress());
+}
+}
+
+private String getACLs(Request request)
+{
+ByteBuffer reqData = request.request.duplicate();
+reqData.rewind();
+SetACLRequest setACLRequest = new SetACLRequest();
+try {
+ByteBufferInputStream.byteBuffer2Record(reqData, 
setACLRequest);
+} catch (IOException e) {
+e.printStackTrace();
+}
+return ZKUtil.aclToString(setACLRequest.getAcl());
+}
+
+private void addFailedTxnAduitLog(Request request) {
--- End diff --

corrected


---


[GitHub] zookeeper pull request #338: ZOOKEEPER-1260:Audit logging in ZooKeeper serve...

2018-09-12 Thread arshadmohammad
Github user arshadmohammad commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/338#discussion_r217179236
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java ---
@@ -250,30 +267,36 @@ public void processRequest(Request request) {
 lastOp = "CREA";
 rsp = new Create2Response(rc.path, rc.stat);
 err = Code.get(rc.err);
+addAuditLog(request, cnxn, AuditConstants.OP_CREATE, 
rc.path, null, err);
 break;
 }
 case OpCode.delete:
 case OpCode.deleteContainer: {
 lastOp = "DELE";
 err = Code.get(rc.err);
+addAuditLog(request, cnxn, AuditConstants.OP_DELETE, 
rc.path, null, err);
 break;
 }
 case OpCode.setData: {
 lastOp = "SETD";
 rsp = new SetDataResponse(rc.stat);
 err = Code.get(rc.err);
+addAuditLog(request, cnxn, AuditConstants.OP_SETDATA, 
rc.path, null, err);
 break;
 }
 case OpCode.reconfig: {
 lastOp = "RECO";
 rsp = new 
GetDataResponse(((QuorumZooKeeperServer)zks).self.getQuorumVerifier().toString().getBytes(),
 rc.stat);
 err = Code.get(rc.err);
+addAuditLog(request, cnxn, AuditConstants.OP_RECONFIG, 
rc.path, null, err);
 break;
 }
 case OpCode.setACL: {
 lastOp = "SETA";
 rsp = new SetACLResponse(rc.stat);
 err = Code.get(rc.err);
+addAuditLog(request, cnxn, AuditConstants.OP_SETACL, 
rc.path, getACLs(request),
--- End diff --

corrected, added one more check at the before making audit log itself
if (ZKAuditLogger.isAuditEnabled()) {
addAuditLog(request, cnxn, AuditConstants.OP_SETACL, 
rc.path, getACLs(request), err);
}


---


[GitHub] zookeeper issue #605: [ZOOKEEPER-3125] Fixing pzxid consistent issue when re...

2018-09-12 Thread anmolnar
Github user anmolnar commented on the issue:

https://github.com/apache/zookeeper/pull/605
  
@lvfangmin Cool, thanks for the info, but unfortunately the commit script 
is quite strict and works with PRs. Maybe I could circumvent the process and 
commit the change manually, but I think it would be a lot easier to just create 
a separate PR.


---


[jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-1260:
--

-1 overall.  GitHub Pull Request  Build
  

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

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

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 3.0.1) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159//console

This message is automatically generated.

> Audit logging in ZooKeeper servers.
> ---
>
> Key: ZOOKEEPER-1260
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Mahadev konar
>Assignee: Mohammad Arshad
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Lots of users have had questions on debugging which client changed what znode 
> and what updates went through a znode. We should add audit logging as in 
> Hadoop (look at Namenode Audit logging) to log which client changed what in 
> the zookeeper servers. This could just be a log4j audit logger.



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


Failed: ZOOKEEPER- PreCommit Build #2159

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 78.02 MB...]
 [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 failed 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/2159//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2159//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16612668 added to ZOOKEEPER-1260.
 [exec] Session logged out. Session was 
JSESSIONID=B4E5FB808BB8F178C03A0CA93105BBF6.
 [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 FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1842:
 exec returned: 1

Total time: 14 minutes 36 seconds
Build step 'Execute shell' marked build as failure
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-1260
Putting comment on the pull request
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: Failure - Any
Sending email for trigger: Failure - Any
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) 
##
1 tests failed.
FAILED:  
org.apache.zookeeper.server.quorum.StandaloneDisabledTest.startSingleServerTest

Error Message:
test timed out after 60 milliseconds

Stack Trace:
org.junit.runners.model.TestTimedOutException: test timed out after 60 
milliseconds
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1524)
at org.apache.zookeeper.ClientCnxn.submitRequest(ClientCnxn.java:1507)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:1457)
at 
org.apache.zookeeper.test.ReconfigTest.createZNode(ReconfigTest.java:192)
at 
org.apache.zookeeper.test.ReconfigTest.testNormalOperation(ReconfigTest.java:165)
at 
org.apache.zookeeper.server.quorum.StandaloneDisabledTest.testReconfig(StandaloneDisabledTest.java:243)
at 
org.apache.zookeeper.server.quorum.StandaloneDisabledTest.startSingleServerTest(StandaloneDisabledTest.java:113)
at 
org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:79)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)

[jira] [Commented] (ZOOKEEPER-3146) Limit the maximum client connections per IP in NettyServerCnxnFactory

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-3146:
--

+1 overall.  GitHub Pull Request  Build
  

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

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

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 3.0.1) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

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

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158//console

This message is automatically generated.

>  Limit the maximum client connections per IP in NettyServerCnxnFactory
> --
>
> Key: ZOOKEEPER-3146
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3146
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> There is maximum connections per IP limit in NIOServerCnxnFactory 
> implementation, but not exist in Netty, this is useful to avoid spamming 
> happened on prod ensembles. 
> This Jira is going to add similar throttling logic in NettyServerCnxnFactory.



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


Success: ZOOKEEPER- PreCommit Build #2158

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 81.05 MB...]
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified 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/2158//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2158//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16612650 added to ZOOKEEPER-3146.
 [exec] Session logged out. Session was 
JSESSIONID=9FEAAC9693FD54677B364C5BD4A8BD42.
 [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: 18 minutes 2 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-3146
Putting comment on the pull request
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 #605: [ZOOKEEPER-3125] Fixing pzxid consistent issue when re...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/605
  
@anmolnar the conflict is due to the missing of FuzzySnapshotRelatedTest 
class introduced in ZOOKEEPER-3127, which is fixing the data inconsistency due 
to multi-op txn.

We need that in 3.5 as well, if you cherry pick that to 3.5 first, then we 
won't have conflict for this one.

Manually tested cherry pick ZOOKEEPER-3127 to 3.5 branch, there is a very 
minor conflict in QuorumPeerMainTest, it should be trivial to change while 
cherry-picking.


---


[jira] [Updated] (ZOOKEEPER-3146) Limit the maximum client connections per IP in NettyServerCnxnFactory

2018-09-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot updated ZOOKEEPER-3146:
--
Labels: pull-request-available  (was: )

>  Limit the maximum client connections per IP in NettyServerCnxnFactory
> --
>
> Key: ZOOKEEPER-3146
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3146
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>
> There is maximum connections per IP limit in NIOServerCnxnFactory 
> implementation, but not exist in Netty, this is useful to avoid spamming 
> happened on prod ensembles. 
> This Jira is going to add similar throttling logic in NettyServerCnxnFactory.



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


[GitHub] zookeeper pull request #623: [ZOOKEEPER-3146] Limit the maximum client conne...

2018-09-12 Thread lvfangmin
GitHub user lvfangmin opened a pull request:

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

[ZOOKEEPER-3146] Limit the maximum client connections per IP in 
NettyServerCnxnFactory

Add similar max cnxn per ip throttling logic to Netty implementation.

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

$ git pull https://github.com/lvfangmin/zookeeper ZOOKEEPER-3146

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

https://github.com/apache/zookeeper/pull/623.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 #623


commit 43bef3a6f91af7cc224122907e35b55d2d2db3c0
Author: Fangmin Lyu 
Date:   2018-09-12T19:25:01Z

Limit the maximum client connections per IP in NettyServerCnxnFactory




---


[jira] [Commented] (ZOOKEEPER-3145) Potential watch missing issue due to stale pzxid when replaying CloseSession txn with fuzzy snapshot

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-3145:
--

-1 overall.  GitHub Pull Request  Build
  

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

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

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 3.0.1) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

-1 core tests.  The patch failed core unit tests.

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157//console

This message is automatically generated.

> Potential watch missing issue due to stale pzxid when replaying CloseSession 
> txn with fuzzy snapshot
> 
>
> Key: ZOOKEEPER-3145
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3145
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is another issue I found recently, we haven't seen this problem on prod 
> (or maybe we don't notice).
>  
> Currently, the CloseSession is not idempotent, executing the CloseSession 
> twice won't get the same result.
>  
> The problem is that closeSession will only check what's the ephemeral nodes 
> associated with that session bases on current states. Nodes deleted during 
> taking fuzzy snapshot won't be deleted again when replay the txn.
>  
> This looks fine, since it's already gone, but there is problem with the pzxid 
> of the parent node. Snapshot is taken fuzzily, so it's possible that the 
> parent had been serialized while the nodes are being deleted when executing 
> the closeSession Txn. The pzxid will not be updated in the snapshot when 
> replaying the closeSession txn, because doesn't know what's the paths being 
> deleted, so it won't patch the pzxid like what we did in the deleteNode 
> ZOOKEEPER-3125.
>  
> The inconsistent pzxid will lead to potential watch notification missing when 
> client reconnect with setWatches because of the staleness. 
>  
> This JIRA is going to fix those issues by adding the CloseSessionTxn, it will 
> record all those nodes being deleted in that CloseSession txn, so that we 
> know which nodes to update when replaying the txn.



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


Failed: ZOOKEEPER- PreCommit Build #2157

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 75.29 MB...]
 [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 failed 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/2157//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2157//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16612617 added to ZOOKEEPER-3145.
 [exec] Session logged out. Session was 
JSESSIONID=3D0394AF10FF05211E31CF1093F3F62A.
 [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 FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1842:
 exec returned: 1

Total time: 18 minutes 2 seconds
Build step 'Execute shell' marked build as failure
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-3145
Putting comment on the pull request
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: Failure - Any
Sending email for trigger: Failure - Any
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

[jira] [Created] (ZOOKEEPER-3146) Limit the maximum client connections per IP in NettyServerCnxnFactory

2018-09-12 Thread Fangmin Lv (JIRA)
Fangmin Lv created ZOOKEEPER-3146:
-

 Summary:  Limit the maximum client connections per IP in 
NettyServerCnxnFactory
 Key: ZOOKEEPER-3146
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3146
 Project: ZooKeeper
  Issue Type: Improvement
  Components: server
Reporter: Fangmin Lv
Assignee: Fangmin Lv
 Fix For: 3.6.0


There is maximum connections per IP limit in NIOServerCnxnFactory 
implementation, but not exist in Netty, this is useful to avoid spamming 
happened on prod ensembles. 

This Jira is going to add similar throttling logic in NettyServerCnxnFactory.



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


ZooKeeper-trunk-windows-cmake - Build # 2933 - Still Failing

2018-09-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-windows-cmake/2933/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 9.71 KB...]
[ivy:retrieve]  confs: [javacc]
[ivy:retrieve]  found net.java.dev.javacc#javacc;5.0 in maven2
[ivy:retrieve] :: resolution report :: resolve 37ms :: artifacts dl 2ms
-
|  |modules||   artifacts   |
|   conf   | number| search|dwnlded|evicted|| number|dwnlded|
-
|  javacc  |   1   |   0   |   0   |   0   ||   1   |   0   |
-
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [javacc]
[ivy:retrieve]  1 artifacts copied, 0 already retrieved (291kB/17ms)

generate_jute_parser:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\jute_compiler\org\apache\jute\compiler\generated
[ivy:artifactproperty] DEPRECATED: 'ivy.conf.file' is deprecated, use 
'ivy.settings.file' instead
[ivy:artifactproperty] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\ivysettings.xml
 [move] Moving 1 file to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\javacc\lib
   [javacc] Java Compiler Compiler Version 5.0 (Parser Generator)
   [javacc] (type "javacc" with no arguments for help)
   [javacc] Reading from file 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\zookeeper-jute\src\main\java\org\apache\jute\compiler\generated\rcc.jj
 . . .
   [javacc] File "TokenMgrError.java" does not exist.  Will create one.
   [javacc] File "ParseException.java" does not exist.  Will create one.
   [javacc] File "Token.java" does not exist.  Will create one.
   [javacc] File "SimpleCharStream.java" does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:
[javac] Compiling 39 source files to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with 
-source 1.8
[javac] 1 warning

compile_jute_uptodate:

compile_jute:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\src\java\generated
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\zookeeper-client\zookeeper-client-c\generated
 [java] ../../../zookeeper-jute/src/main/resources/zookeeper.jute Parsed 
Successfully
 [java] ../../../zookeeper-jute/src/main/resources/zookeeper.jute Parsed 
Successfully
[touch] Creating 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\src\java\generated\.generated

BUILD SUCCESSFUL
Total time: 7 seconds
[ZooKeeper-trunk-windows-cmake] $ cmd /c call 
F:\jenkins\jenkins-slave\temp\jenkins7561258108796402294.bat

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cd src/c 
The system cannot find the path specified.

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cmake . 
CMake Error: The source directory 
"F:/jenkins/jenkins-slave/workspace/ZooKeeper-trunk-windows-cmake" does not 
appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cmake --build 
. 
Error: could not load cache

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>exit 1 
Build step 'Execute Windows batch command' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



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

[jira] [Updated] (ZOOKEEPER-3145) Potential watch missing issue due to stale pzxid when replaying CloseSession txn with fuzzy snapshot

2018-09-12 Thread Fangmin Lv (JIRA)


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

Fangmin Lv updated ZOOKEEPER-3145:
--
Summary: Potential watch missing issue due to stale pzxid when replaying 
CloseSession txn with fuzzy snapshot  (was: Potential watch missing issue due 
to stale pzxid when replaying CloseSession txn with fuzzy snapshhot)

> Potential watch missing issue due to stale pzxid when replaying CloseSession 
> txn with fuzzy snapshot
> 
>
> Key: ZOOKEEPER-3145
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3145
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This is another issue I found recently, we haven't seen this problem on prod 
> (or maybe we don't notice).
>  
> Currently, the CloseSession is not idempotent, executing the CloseSession 
> twice won't get the same result.
>  
> The problem is that closeSession will only check what's the ephemeral nodes 
> associated with that session bases on current states. Nodes deleted during 
> taking fuzzy snapshot won't be deleted again when replay the txn.
>  
> This looks fine, since it's already gone, but there is problem with the pzxid 
> of the parent node. Snapshot is taken fuzzily, so it's possible that the 
> parent had been serialized while the nodes are being deleted when executing 
> the closeSession Txn. The pzxid will not be updated in the snapshot when 
> replaying the closeSession txn, because doesn't know what's the paths being 
> deleted, so it won't patch the pzxid like what we did in the deleteNode 
> ZOOKEEPER-3125.
>  
> The inconsistent pzxid will lead to potential watch notification missing when 
> client reconnect with setWatches because of the staleness. 
>  
> This JIRA is going to fix those issues by adding the CloseSessionTxn, it will 
> record all those nodes being deleted in that CloseSession txn, so that we 
> know which nodes to update when replaying the txn.



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


[jira] [Updated] (ZOOKEEPER-3145) Potential watch missing issue due to stale pzxid when replaying CloseSession txn with fuzzy snapshhot

2018-09-12 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot updated ZOOKEEPER-3145:
--
Labels: pull-request-available  (was: )

> Potential watch missing issue due to stale pzxid when replaying CloseSession 
> txn with fuzzy snapshhot
> -
>
> Key: ZOOKEEPER-3145
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3145
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>
> This is another issue I found recently, we haven't seen this problem on prod 
> (or maybe we don't notice).
>  
> Currently, the CloseSession is not idempotent, executing the CloseSession 
> twice won't get the same result.
>  
> The problem is that closeSession will only check what's the ephemeral nodes 
> associated with that session bases on current states. Nodes deleted during 
> taking fuzzy snapshot won't be deleted again when replay the txn.
>  
> This looks fine, since it's already gone, but there is problem with the pzxid 
> of the parent node. Snapshot is taken fuzzily, so it's possible that the 
> parent had been serialized while the nodes are being deleted when executing 
> the closeSession Txn. The pzxid will not be updated in the snapshot when 
> replaying the closeSession txn, because doesn't know what's the paths being 
> deleted, so it won't patch the pzxid like what we did in the deleteNode 
> ZOOKEEPER-3125.
>  
> The inconsistent pzxid will lead to potential watch notification missing when 
> client reconnect with setWatches because of the staleness. 
>  
> This JIRA is going to fix those issues by adding the CloseSessionTxn, it will 
> record all those nodes being deleted in that CloseSession txn, so that we 
> know which nodes to update when replaying the txn.



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


[GitHub] zookeeper pull request #622: [ZOOKEEPER-3145] Potential watch missing issue ...

2018-09-12 Thread lvfangmin
GitHub user lvfangmin opened a pull request:

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

[ZOOKEEPER-3145] Potential watch missing issue due to stale pzxid when 
replaying CloseSession txn with fuzzy snapshot

Currently, the CloseSession txn is not idempotent, executing the 
CloseSession twice won't get the same result, which could cause pzxid 
inconsistent, which in turn cause watches missing.

For more details, please check the description in ZOOKEEPER-3145.

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

$ git pull https://github.com/lvfangmin/zookeeper ZOOKEEPER-3145

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

https://github.com/apache/zookeeper/pull/622.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 #622


commit 9576e25ae1ecc09b8d17a144b9aa82604f03fdd0
Author: Fangmin Lyu 
Date:   2018-09-12T18:30:05Z

Add CloseSessionTxn to track the nodes being deleted when close session




---


Failed: ZOOKEEPER- PreCommit Build #2156

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 80.41 MB...]
 [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 appears to introduce 1 new Findbugs 
(version 3.0.1) warnings.
 [exec] 
 [exec] -1 release audit.  The applied patch generated 1 release audit 
warnings (more than the trunk's current 0 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/2156//testReport/
 [exec] Release audit warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16612538 added to ZOOKEEPER-1177.
 [exec] Session logged out. Session was 
JSESSIONID=AA41C0390A9D90C6F80C5BCDB98EF665.
 [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 FAILED
/home/jenkins/jenkins-slave/workspace/PreCommit-ZOOKEEPER-github-pr-build/build.xml:1850:
 exec returned: 2

Total time: 17 minutes 57 seconds
Build step 'Execute shell' marked build as failure
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-1177
Putting comment on the pull request
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: Failure - Any
Sending email for trigger: Failure - Any
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

[jira] [Commented] (ZOOKEEPER-1177) Enabling a large number of watches for a large number of clients

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-1177:
--

-1 overall.  GitHub Pull Request  Build
  

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

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

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

-1 findbugs.  The patch appears to introduce 1 new Findbugs (version 3.0.1) 
warnings.

-1 release audit.  The applied patch generated 1 release audit warnings 
(more than the trunk's current 0 warnings).

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

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//testReport/
Release audit warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//artifact/trunk/patchprocess/patchReleaseAuditProblems.txt
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2156//console

This message is automatically generated.

> Enabling a large number of watches for a large number of clients
> 
>
> Key: ZOOKEEPER-1177
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1177
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Affects Versions: 3.3.3
>Reporter: Vishal Kathuria
>Assignee: Fangmin Lv
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1177.patch, ZOOKEEPER-1177.patch, 
> ZooKeeper-with-fix-for-findbugs-warning.patch, ZooKeeper.patch, 
> Zookeeper-after-resolving-merge-conflicts.patch
>
>  Time Spent: 5h 20m
>  Remaining Estimate: 0h
>
> In my ZooKeeper, I see watch manager consuming several GB of memory and I dug 
> a bit deeper.
> In the scenario I am testing, I have 10K clients connected to an observer. 
> There are about 20K znodes in ZooKeeper, each is about 1K - so about 20M data 
> in total.
> Each client fetches and puts watches on all the znodes. That is 200 million 
> watches.
> It seems a single watch takes about 100  bytes. I am currently at 14528037 
> watches and according to the yourkit profiler, WatchManager has 1.2 G 
> already. This is not going to work as it might end up needing 20G of RAM just 
> for the watches.
> So we need a more compact way of storing watches. Here are the possible 
> solutions.
> 1. Use a bitmap instead of the current hashmap. In this approach, each znode 
> would get a unique id when its gets created. For every session, we can keep 
> track of a bitmap that indicates the set of znodes this session is watching. 
> A bitmap, assuming a 100K znodes, would be 12K. For 10K sessions, we can keep 
> track of watches using 120M instead of 20G.
> 2. This second idea is based on the observation that clients watch znodes in 
> sets (for example all znodes under a folder). Multiple clients watch the same 
> set and the total number of sets is a couple of orders of magnitude smaller 
> than the total number of znodes. In my scenario, there are about 100 sets. So 
> instead of keeping track of watches at the znode level, keep track of it at 
> the set level. It may mean that get may also need to be implemented at the 
> set level. With this, we can save the watches in 100M.
> Are there any other suggestions of solutions?
> Thanks
>  



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


[GitHub] zookeeper issue #590: [ZOOKEEPER-1177] Add the memory optimized watch manage...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/590
  
Resolve conflict with latest code on master.


---


[GitHub] zookeeper issue #590: [ZOOKEEPER-1177] Add the memory optimized watch manage...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/590
  
Update based on the comments:

1. add findbugs exclusion
2. add comments for the newly added classes
3. add admin doc for the new JVM options introduced in this diff
4. move the bench project to src/test/java/bench
5. move DumbWatcher to src/java/main dir for share between unit test and 
bench
6. change to use ExitCode

@nkalmar I moved the bench to src/test/java/bench, which seems more 
reasonable to me, let me know if you think that's not a good position based on 
your plan.


---


Failed: ZOOKEEPER- PreCommit Build #2155

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2155/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 3.59 KB...]
at 
hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1080)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1187)
at hudson.scm.SCM.checkout(SCM.java:504)
at 
hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
at 
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
at hudson.model.Run.execute(Run.java:1794)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at 
hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
hudson.plugins.git.GitException: Command "git merge 
4043700078f0b1d55a68b4d033cb761b30fd89de" returned status code 1:
stdout: Auto-merging 
zookeeper-docs/src/documentation/content/xdocs/zookeeperAdmin.xml
Auto-merging 
src/java/test/org/apache/zookeeper/server/watch/WatchesSummaryTest.java
Auto-merging 
src/java/test/org/apache/zookeeper/server/watch/WatchesReportTest.java
Auto-merging 
src/java/test/org/apache/zookeeper/server/watch/WatchesPathReportTest.java
Auto-merging src/java/main/org/apache/zookeeper/server/watch/WatchesSummary.java
Auto-merging src/java/main/org/apache/zookeeper/server/watch/WatchesReport.java
Auto-merging 
src/java/main/org/apache/zookeeper/server/watch/WatchesPathReport.java
Auto-merging src/java/main/org/apache/zookeeper/server/watch/WatchManager.java
Auto-merging src/java/main/org/apache/zookeeper/server/ZKDatabase.java
CONFLICT (content): Merge conflict in 
src/java/main/org/apache/zookeeper/server/ZKDatabase.java
Auto-merging src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
Auto-merging src/java/main/org/apache/zookeeper/server/DataTree.java
CONFLICT (content): Merge conflict in 
src/java/main/org/apache/zookeeper/server/DataTree.java
Auto-merging build.xml
CONFLICT (content): Merge conflict in build.xml
Automatic merge failed; fix conflicts and then commit the result.

stderr: 
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1966)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1597)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$3.execute(CliGitAPIImpl.java:697)
at 
org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.merge(AbstractGitAPIImpl.java:86)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.merge(CliGitAPIImpl.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:929)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:903)
at 
hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:855)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Archiving artifacts
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: No test report files 
were found. Configuration error?
[description-setter] Could not determine description.
Putting comment on the pull request
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



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

[GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/590#discussion_r217112114
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/watch/WatchManagerOptimized.java ---
@@ -0,0 +1,355 @@
+/**
+ * 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.server.watch;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Set;
+import java.util.Iterator;
+import java.lang.Iterable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.Watcher.Event.EventType;
+import org.apache.zookeeper.Watcher.Event.KeeperState;
+import org.apache.zookeeper.server.ServerCnxn;
+import org.apache.zookeeper.server.util.BitMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Optimized in memory and time complexity, compared to WatchManager, both 
the
+ * memory consumption and time complexity improved a lot, but it cannot
+ * efficiently remove the watcher when the session or socket is closed, for
+ * majority usecase this is not a problem.
+ *
+ * Changed made compared to WatchManager:
+ *
+ * - Use HashSet and BitSet to store the watchers to find a balance between
+ *   memory usage and time complexity
+ * - Use ReadWriteLock instead of synchronized to reduce lock retention
+ * - Lazily clean up the closed watchers
+ */
+public class WatchManagerOptimized
+implements IWatchManager, DeadWatcherListener {
+
+private static final Logger LOG =
+LoggerFactory.getLogger(WatchManagerOptimized.class);
+
+private final ConcurrentHashMap pathWatches =
+new ConcurrentHashMap();
+
+// watcher to bit id mapping
+private final BitMap watcherBitIdMap = new BitMap();
+
+// used to lazily remove the dead watchers
+private final WatcherCleaner watcherCleaner;
+
+private final ReentrantReadWriteLock addRemovePathRWLock = new 
ReentrantReadWriteLock();
+
+public WatchManagerOptimized() {
+watcherCleaner = new WatcherCleaner(this);
+watcherCleaner.start();
+}
+
+@Override
+public boolean addWatch(String path, Watcher watcher) {
+boolean result = false;
+addRemovePathRWLock.readLock().lock();
+try {
+// avoid race condition of adding a on flying dead watcher
+if (isDeadWatcher(watcher)) {
+LOG.debug("Ignoring addWatch with closed cnxn");
+} else {
+Integer bit = watcherBitIdMap.add(watcher);
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null) {
+watchers = new BitHashSet();
+BitHashSet existingWatchers = 
pathWatches.putIfAbsent(path, watchers);
+if (existingWatchers != null) {
+watchers = existingWatchers;
+}
+}
+result = watchers.add(bit);
+}
+} finally {
+addRemovePathRWLock.readLock().unlock();
+}
+return result;
+}
+
+@Override
+public boolean containsWatcher(String path, Watcher watcher) {
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null || 
!watchers.contains(watcherBitIdMap.getBit(watcher))) {
+return false;
+}
+return true;

Re: ZooKeeper 3.5 blocker issues

2018-09-12 Thread Fangmin Lv
Andor,

ZOOKEEPER-3114 is about adding real time digest checking to help detecting
inconsistency, it's a new feature with amounts of code change. I'll start
upstream it part by part, but I don't expect it's being merged in the next
few weeks. So yes, it's a nice to have, but definitely not a block for 3.5.

Thanks,
Fangmin

On Wed, Sep 12, 2018 at 2:55 AM Andor Molnar  wrote:

> Fangmin,
>
> Sorry, I just noticed that you want to include the consistency fixes in
> the stable version which is fine. Let’s finish the backports and we’ll be
> done with them.
>
> ZOOKEEPER-3114 is essentially a new feature, I wouldn’t block 3.5 with
> that. What do you think?
>
> Andor
>
>
>
> > On 2018. Sep 12., at 11:52, Andor Molnar  wrote:
> >
> > Cool, thanks for the clarification.
> >
> > The updated list is as follows:
> >
> > - ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
> > - ZOOKEEPER-1818 (Fix don't care for trunk)
> > - ZOOKEEPER-2778 (Potential server deadlock between follower sync with
> leader and follower receiving external connection requests.)
> >
> > The following are not critical and no blockers for the stable release:
> >
> > Waiting for to be ported to 3.5:
> > - ZOOKEEPER-3104
> > - ZOOKEEPER-3125
> > - ZOOKEEPER-3127
> >
> > New feature:
> > - ZOOKEEPER-3114 (fixes ZOOKEEPER-2184 too)
> >
> > Regards,
> > Andor
> >
> >
> >
> >> On 2018. Sep 12., at 0:42, Fangmin Lv  wrote:
> >>
> >> Hi Andor,
> >>
> >> That's the on disk txn feature, which was disabled internally after we
> >> found the potentially inconsistent issue. The only solution we have for
> now
> >> is waiting for the new digest checking feature I mentioned in
> >> ZOOKEEPER-3114.
> >>
> >> I think there are some other critical consistent issues we just fixed on
> >> master recently: ZOOKEEPER-3104, ZOOKEEPER-3125, ZOOKEEPER-3127, I
> think we
> >> should include that in the official 3.5 release as well.
> >>
> >> Thanks,
> >> Fangmin
> >>
> >> On Tue, Sep 11, 2018 at 11:58 AM Andor Molnár  wrote:
> >>
> >>> Hi Jeelani,
> >>>
> >>>
> >>> Thanks for letting me know. I'm happy to remove it from the list to get
> >>> closer to a stable release. :)
> >>>
> >>> What's the feature which can be disabled to avoid data inconsistency?
> >>>
> >>>
> >>> Andor
> >>>
> >>>
> >>>
> >>> On 09/10/2018 11:33 PM, Mohamed Jeelani wrote:
>  Thanks Andor for compiling this. Should we be ignoring ZOOKEEPER-2418
> as
> >>> well? This exists in 3.4 as well and the feature can be disabled. We
> are
> >>> working on a longer term fix for it in 3.6.
> 
>  Regards,
> 
>  Jeelani
> 
>  On 9/10/18, 5:19 AM, "Andor Molnar" 
> wrote:
> 
>    Fine.
> 
>    I'm happy to ignore 1549, 2846 and 2930. Still we have the list of:
> 
>    - ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
>    - ZOOKEEPER-1818 (Fix don't care for trunk)
>    - ZOOKEEPER-2418 (txnlog diff sync can skip sending some
> >>> transactions to
>    followers)
>    - ZOOKEEPER-2778 (Potential server deadlock between follower sync
> >>> with
>    leader and follower receiving external connection requests.)
> 
>    SSL (ZK-236) is a feature which essential for the 3.5 release, hence
> >>> I
>    wouldn't leave it out or postpone it for the next stable release. PR
> >>> has
>    been out for a long time, get on reviewing please.
>    The rest are also long outstanding issues which have been found in
> >>> the 3.5
>    branch.
>    ZK-1818 is something which was found in 3.4 and fixed in 3.4, but
> >>> never has
>    been fixed in 3.5. Quite a serious issue if still present.
> 
>    I think we should at least run some manual testing and see if we
> >>> could
>    repro any of these issues before going ahead with a stable release.
> 
>    Regards,
>    Andor
> 
> 
> 
> 
>    On Fri, Sep 7, 2018 at 3:24 AM, Michael Han 
> wrote:
> 
> > I haven't went through the entire list, but looks like lots of the
> >>> JIRA
> > issues listed in this thread, such as ZOOKEEPER-1549, 2846, also
> >>> affects
> > 3.4 releases. Should we scope these issues out?
> >
> > I think historically the single outstanding blocking issue for a
> >>> stable 3.5
> > release is the reconfig feature and security concerns around it
> >>> (somehow
> > addressed in ZOOKEEPER-2014), and the alpha and beta releases were
> >>> created
> > to stabilize that feature.
> >
> >
> >>>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__zookeeper-2Duser.578899.n2.nabble.com_Zookeeper-2Dwith-2D=DwIBaQ=5VD0RTtNlTh3ycd41b3MUw=Vl4oKanLQehvaulUvoKg8A=wqlhnot9c-pQLdkGkccSGNpELUNUnB-wy_h0iA3PRqI=_tGtL3nMWtuPrXKXDx27AIWOzyyT7W-CjIVLDFZwT0E=
> > SSL-release-date-tt7581744.html
> >
> > So it looks like we are in good shape to release. Something might
> >>> worth
> > doing to claim the quality of 3.5 is on par with 3.4
> >
> 

[GitHub] zookeeper issue #605: [ZOOKEEPER-3125] Fixing pzxid consistent issue when re...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on the issue:

https://github.com/apache/zookeeper/pull/605
  
Thanks @anmolnar, will create a PR for 3.5.


---


[jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.

2018-09-12 Thread Mohammad Arshad (JIRA)


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

Mohammad Arshad commented on ZOOKEEPER-1260:


 To run the performance utility, go to zookeeper folder and run the following 
command:
{code:java}
java -cp 
zookeeper-3.6.0-SNAPSHOT.jar:lib/*:dist-maven/zookeeper-3.6.0-SNAPSHOT-tests.jar
 org.apache.zookeeper.audit.ZKAuditLoggerPerformance localhost:2181 / 5000{code}
ZKAuditLoggerPerformance is added as part of audit log feature. To run this 
command on old zookeeper installation
 * Build ZooKeper with audit log feature patch 
 * Copy zookeeper-3.6.0-SNAPSHOT-tests.jar to old zookeeper 's dist-maven 
folder and then run above command

> Audit logging in ZooKeeper servers.
> ---
>
> Key: ZOOKEEPER-1260
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Mahadev konar
>Assignee: Mohammad Arshad
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Lots of users have had questions on debugging which client changed what znode 
> and what updates went through a znode. We should add audit logging as in 
> Hadoop (look at Namenode Audit logging) to log which client changed what in 
> the zookeeper servers. This could just be a log4j audit logger.



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


[jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.

2018-09-12 Thread Mohammad Arshad (JIRA)


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

Mohammad Arshad commented on ZOOKEEPER-1260:


>From the performance readings, seems performance impact very less when feature 
>is disabled.

> Audit logging in ZooKeeper servers.
> ---
>
> Key: ZOOKEEPER-1260
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Mahadev konar
>Assignee: Mohammad Arshad
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Lots of users have had questions on debugging which client changed what znode 
> and what updates went through a znode. We should add audit logging as in 
> Hadoop (look at Namenode Audit logging) to log which client changed what in 
> the zookeeper servers. This could just be a log4j audit logger.



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


[jira] [Commented] (ZOOKEEPER-1260) Audit logging in ZooKeeper servers.

2018-09-12 Thread Mohammad Arshad (JIRA)


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

Mohammad Arshad commented on ZOOKEEPER-1260:


To assess the performance impact of audit log feature I created, deleted and 
set data 5000 times on three types of clusters. Here is performance readings 
grouped by cluster type
 * ZooKeeper package does not have audit log feature.
   create=14776 ms
   setData=12223 ms
   delete=12599 ms
 * ZooKeeper package have audit log feature but it is disabled by configuration
   create=15161 ms
   setData=13328 ms
   delete=13046 ms
 * ZooKeeper package have audit log feature and it is enabled
   create=17364 ms
   setData=13612 ms
   delete=14174 ms

> Audit logging in ZooKeeper servers.
> ---
>
> Key: ZOOKEEPER-1260
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1260
> Project: ZooKeeper
>  Issue Type: New Feature
>  Components: server
>Reporter: Mahadev konar
>Assignee: Mohammad Arshad
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1260-01.patch, zookeeperAuditLogs.pdf
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Lots of users have had questions on debugging which client changed what znode 
> and what updates went through a znode. We should add audit logging as in 
> Hadoop (look at Namenode Audit logging) to log which client changed what in 
> the zookeeper servers. This could just be a log4j audit logger.



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


Re: Java version (Oracle - OpenJDK) support

2018-09-12 Thread Enrico Olivelli
Il mer 12 set 2018, 11:37 Norbert Kalmar  ha
scritto:

> Thanks Enrico!
>
> Agree, as I mentioned, only JDK8 and 11 should be tested on 3.4 and other
> branches as well.
>
> I checked the Kerby problems, 3.4 does not have Kerby, it uses Apache
> directory server.
> Maybe we should introduce also introduce Kerby on 3.4? Or just try to fix
> the problems with directory server.
>

Directory Server supports jdk6 and Kerby not.
If wr drop JDK6 we  can switch to Kerby

Enrico



> Regards,
> Norbert
>
> On Wed, Sep 12, 2018 at 11:22 AM Enrico Olivelli 
> wrote:
>
> > Il giorno mer 12 set 2018 alle ore 11:04 Norbert Kalmar
> >  ha scritto:
> >
> > > Hi all,
> > >
> > > Oracle8 will have it's support end in January. They changed there
> release
> > > drastically.
> > > A good article on that:
> > > https://dev.karakun.com/java/2018/06/25/java-releases.html
> > >
> > > Long story short: From January, no Oracle JDK version can be used in
> PROD
> > > environment without a license. End every release, even LTS (next one is
> > > version 11) will only have a 6 month public update period.
> > >
> > > We should also decide on the supported versions of Java.
> > >
> > > My opinion: We should make sure ZK is compatible with Oracle 8 and 11,
> > and
> > > also openJDK 8 and 11.
> > >
> > > But after that, every 6 month, there will be a new Oracle Java version
> > > which we should support.
> > >
> > > What do you think? What version to support? What about 3.4 now that 3.5
> > is
> > > getting close to stable? (I think fix 3.4 on Oracle 11 and that's it -
> > 3.5
> > > stable should be out by the time 12 comes out).
> > >
> >
> > As far as I know ZK is running fine on JDK11, even 3.4.
> > We have a problem with Kerberos tests on 3.4, but we can fix them.
> >
> >
> > I can add that as far as I know there will not be any 'Oracle JDK 12" GA,
> > but only OpenJDK will be released to GA from Oracle
> >
> >
> > >
> > > Once we have an agreement, we should create jira's to fix Java11
> > problems.
> > >
> >
> > Ok to me
> >
> > We can consider also dropping support for JDK6 on 3.4 branch, this is
> > actually the problem
> >
> > Enrico
> >
> >
> > > Regards,
> > > Norbert
> > >
> >
>
-- 


-- Enrico Olivelli


[jira] [Commented] (ZOOKEEPER-1823) zkTxnLogToolkit -dump should support printing transaction data as a string

2018-09-12 Thread Hudson (JIRA)


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

Hudson commented on ZOOKEEPER-1823:
---

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #188 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/188/])
ZOOKEEPER-1823: zkTxnLogToolkit -dump should support printing (andor: rev 
14870ddd4b87afe3af497ec0569ce439c0488053)
* (edit) zookeeper-docs/src/documentation/content/xdocs/zookeeperAdmin.xml
* (edit) 
src/java/main/org/apache/zookeeper/server/persistence/TxnLogToolkit.java


> zkTxnLogToolkit -dump should support printing transaction data as a string
> --
>
> Key: ZOOKEEPER-1823
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1823
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Raul Gutierrez Segales
>Assignee: maoling
>Priority: Trivial
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1823.patch
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Some times it's handy to have LogFormatter show you the content of the 
> transactions (i.e.: if you are storing text).



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


[jira] [Commented] (ZOOKEEPER-3125) Pzxid inconsistent issue when replaying a txn for a deleted node

2018-09-12 Thread Hudson (JIRA)


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

Hudson commented on ZOOKEEPER-3125:
---

FAILURE: Integrated in Jenkins build ZooKeeper-trunk #188 (See 
[https://builds.apache.org/job/ZooKeeper-trunk/188/])
ZOOKEEPER-3125: Fixing pzxid consistent issue when replaying a txn for a 
(andor: rev 6651a126cd85ced8b26786875b81be140ad97c80)
* (edit) 
src/java/test/org/apache/zookeeper/server/quorum/FuzzySnapshotRelatedTest.java
* (edit) src/java/main/org/apache/zookeeper/server/DataTree.java


> Pzxid inconsistent issue when replaying a txn for a deleted node
> 
>
> Key: ZOOKEEPER-3125
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3125
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> When taking snapshot or syncing snapshot from leader, it's having fuzzy 
> snapshot, which means the parent node might already serialized before the 
> child get deleted, during replay the txn it will skip update the parent pzxid 
> in this case, which will cause inconsistency.



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


ZooKeeper-trunk - Build # 188 - Failure

2018-09-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk/188/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 150.96 KB...]
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.3 
sec, Thread: 1, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
1
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.09 sec, Thread: 1, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 1
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
73.472 sec, Thread: 5, Class: org.apache.zookeeper.test.RecoveryTest
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 5
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.714 sec, Thread: 5, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StatTest in thread 5
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
63.995 sec, Thread: 8, Class: org.apache.zookeeper.test.RestoreCommittedLogTest
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 8
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.711 sec, Thread: 5, Class: org.apache.zookeeper.test.StatTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 5
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.058 sec, Thread: 5, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 5
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.925 sec, Thread: 8, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 8
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.874 sec, Thread: 5, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 5
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
23.672 sec, Thread: 1, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 1
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.128 sec, Thread: 1, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 1
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
16.09 sec, Thread: 8, Class: org.apache.zookeeper.test.TruncateTest
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 8
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
5.794 sec, Thread: 1, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 1
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.127 sec, Thread: 1, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 1
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
21.333 sec, Thread: 5, Class: 
org.apache.zookeeper.test.WatchEventWhenAutoResetTest
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 5
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.863 sec, Thread: 5, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Running org.apache.jute.BinaryInputArchiveTest in thread 5
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.082 sec, Thread: 5, Class: org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
13.076 sec, Thread: 1, Class: org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
630.219 sec, Thread: 4, Class: 
org.apache.zookeeper.server.quorum.StandaloneDisabledTest
[junit] Test org.apache.zookeeper.server.quorum.StandaloneDisabledTest 
FAILED
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
32.597 sec, Thread: 8, Class: org.apache.zookeeper.test.WatcherTest
[junit] Tests run: 105, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
509.438 sec, Thread: 2, Class: org.apache.zookeeper.test.NettyNettySuiteTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
620.073 sec, Thread: 3, Class: org.apache.zookeeper.test.DisconnectedWatcherTest
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
290.62 sec, Thread: 6, Class: 

ZooKeeper_branch35_jdk8 - Build # 1116 - Still Failing

2018-09-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper_branch35_jdk8/1116/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 62.82 KB...]
[junit] Running org.apache.zookeeper.test.ServerCnxnTest in thread 7
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.322 sec, Thread: 6, Class: org.apache.zookeeper.test.SaslSuperUserTest
[junit] Running org.apache.zookeeper.test.SessionInvalidationTest in thread 
3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.03 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionInvalidationTest
[junit] Running org.apache.zookeeper.test.SessionTest in thread 6
[junit] Running org.apache.zookeeper.test.SessionTimeoutTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.765 sec, Thread: 7, Class: org.apache.zookeeper.test.ServerCnxnTest
[junit] Running org.apache.zookeeper.test.SessionTrackerCheckTest in thread 
7
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.953 sec, Thread: 3, Class: org.apache.zookeeper.test.SessionTimeoutTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.134 sec, Thread: 7, Class: org.apache.zookeeper.test.SessionTrackerCheckTest
[junit] Running org.apache.zookeeper.test.SessionUpgradeTest in thread 7
[junit] Running org.apache.zookeeper.test.StandaloneTest in thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.084 sec, Thread: 3, Class: org.apache.zookeeper.test.StandaloneTest
[junit] Running org.apache.zookeeper.test.StatTest in thread 3
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.394 sec, Thread: 3, Class: org.apache.zookeeper.test.StatTest
[junit] Running org.apache.zookeeper.test.StaticHostProviderTest in thread 3
[junit] Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
2.079 sec, Thread: 3, Class: org.apache.zookeeper.test.StaticHostProviderTest
[junit] Running org.apache.zookeeper.test.StringUtilTest in thread 3
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.071 sec, Thread: 3, Class: org.apache.zookeeper.test.StringUtilTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
14.25 sec, Thread: 6, Class: org.apache.zookeeper.test.SessionTest
[junit] Running org.apache.zookeeper.test.SyncCallTest in thread 3
[junit] Running org.apache.zookeeper.test.TruncateTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.136 sec, Thread: 3, Class: org.apache.zookeeper.test.SyncCallTest
[junit] Running org.apache.zookeeper.test.WatchEventWhenAutoResetTest in 
thread 3
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
79.812 sec, Thread: 4, Class: org.apache.zookeeper.test.QuorumZxidSyncTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
7.861 sec, Thread: 6, Class: org.apache.zookeeper.test.TruncateTest
[junit] Running org.apache.zookeeper.test.WatchedEventTest in thread 4
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.144 sec, Thread: 4, Class: org.apache.zookeeper.test.WatchedEventTest
[junit] Running org.apache.zookeeper.test.WatcherFuncTest in thread 6
[junit] Running org.apache.zookeeper.test.WatcherTest in thread 4
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
3.109 sec, Thread: 6, Class: org.apache.zookeeper.test.WatcherFuncTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
23.524 sec, Thread: 7, Class: org.apache.zookeeper.test.SessionUpgradeTest
[junit] Running org.apache.zookeeper.test.X509AuthTest in thread 6
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.144 sec, Thread: 6, Class: org.apache.zookeeper.test.X509AuthTest
[junit] Running org.apache.zookeeper.test.ZkDatabaseCorruptionTest in 
thread 7
[junit] Running org.apache.zookeeper.test.ZooKeeperQuotaTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.937 sec, Thread: 6, Class: org.apache.zookeeper.test.ZooKeeperQuotaTest
[junit] Tests run: 14, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
94.53 sec, Thread: 1, Class: org.apache.zookeeper.test.QuorumTest
[junit] Running org.apache.jute.BinaryInputArchiveTest in thread 6
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.474 sec, Thread: 6, Class: org.apache.jute.BinaryInputArchiveTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
11.469 sec, Thread: 7, Class: org.apache.zookeeper.test.ZkDatabaseCorruptionTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
24.999 sec, Thread: 3, 

ZooKeeper-trunk-windows-cmake - Build # 2932 - Still Failing

2018-09-12 Thread Apache Jenkins Server
See https://builds.apache.org/job/ZooKeeper-trunk-windows-cmake/2932/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 9.71 KB...]
[ivy:retrieve]  confs: [javacc]
[ivy:retrieve]  found net.java.dev.javacc#javacc;5.0 in maven2
[ivy:retrieve] :: resolution report :: resolve 108ms :: artifacts dl 3ms
-
|  |modules||   artifacts   |
|   conf   | number| search|dwnlded|evicted|| number|dwnlded|
-
|  javacc  |   1   |   0   |   0   |   0   ||   1   |   0   |
-
[ivy:retrieve] :: retrieving :: org.apache.zookeeper#zookeeper
[ivy:retrieve]  confs: [javacc]
[ivy:retrieve]  1 artifacts copied, 0 already retrieved (291kB/32ms)

generate_jute_parser:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\jute_compiler\org\apache\jute\compiler\generated
[ivy:artifactproperty] DEPRECATED: 'ivy.conf.file' is deprecated, use 
'ivy.settings.file' instead
[ivy:artifactproperty] :: loading settings :: file = 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\ivysettings.xml
 [move] Moving 1 file to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\javacc\lib
   [javacc] Java Compiler Compiler Version 5.0 (Parser Generator)
   [javacc] (type "javacc" with no arguments for help)
   [javacc] Reading from file 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\zookeeper-jute\src\main\java\org\apache\jute\compiler\generated\rcc.jj
 . . .
   [javacc] File "TokenMgrError.java" does not exist.  Will create one.
   [javacc] File "ParseException.java" does not exist.  Will create one.
   [javacc] File "Token.java" does not exist.  Will create one.
   [javacc] File "SimpleCharStream.java" does not exist.  Will create one.
   [javacc] Parser generated successfully.

jute:
[javac] Compiling 39 source files to 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\build\classes
[javac] warning: [options] bootstrap class path not set in conjunction with 
-source 1.8
[javac] 1 warning

compile_jute_uptodate:

compile_jute:
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\src\java\generated
[mkdir] Created dir: 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\zookeeper-client\zookeeper-client-c\generated
 [java] ../../../zookeeper-jute/src/main/resources/zookeeper.jute Parsed 
Successfully
 [java] ../../../zookeeper-jute/src/main/resources/zookeeper.jute Parsed 
Successfully
[touch] Creating 
f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake\src\java\generated\.generated

BUILD SUCCESSFUL
Total time: 13 seconds
[ZooKeeper-trunk-windows-cmake] $ cmd /c call 
F:\jenkins\jenkins-slave\temp\jenkins6801202411526436951.bat

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cd src/c 
The system cannot find the path specified.

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cmake . 
CMake Error: The source directory 
"F:/jenkins/jenkins-slave/workspace/ZooKeeper-trunk-windows-cmake" does not 
appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>cmake --build 
. 
Error: could not load cache

f:\jenkins\jenkins-slave\workspace\ZooKeeper-trunk-windows-cmake>exit 1 
Build step 'Execute Windows batch command' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any



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

[jira] [Commented] (ZOOKEEPER-2990) Implement probabilistic tracing

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar commented on ZOOKEEPER-2990:
-

We can talk about it, but I would rather create stable release of 3.5 as soon 
as possible and push users to upgrade.

> Implement probabilistic tracing
> ---
>
> Key: ZOOKEEPER-2990
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2990
> Project: ZooKeeper
>  Issue Type: Improvement
>  Components: server
>Reporter: Bogdan Kanivets
>Assignee: Bogdan Kanivets
>Priority: Minor
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> It would be nice to have an ability to do probabilistic tracing similar to 
> Cassandra  
> [nodetool|https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/tools/nodetool/toolsSetTraceProbability.html]
> This will help debug issues in prod systems.
> I'd like to contribute if everyone is ok with the feature.
> My suggestion is to add an extra parameter to ZooTrace to handle it. 
> Questions:
>  * should it be one global param or per each ZooTrace mask? I'm thinking per 
> mask
>  * should it be a new 4lw or part of 'stmk'? Leaning towards new word and 
> refactoring param passing to words (stmk is a special case right now).
>  * there are places in the code that use LOG.trace directly. That will have 
> to change to ZooTrace
> I can make some initial implementation for demo/review.
>  



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


[jira] [Resolved] (ZOOKEEPER-1823) zkTxnLogToolkit -dump should support printing transaction data as a string

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar resolved ZOOKEEPER-1823.
-
Resolution: Fixed

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

> zkTxnLogToolkit -dump should support printing transaction data as a string
> --
>
> Key: ZOOKEEPER-1823
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1823
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Raul Gutierrez Segales
>Assignee: maoling
>Priority: Trivial
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1823.patch
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Some times it's handy to have LogFormatter show you the content of the 
> transactions (i.e.: if you are storing text).



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


[GitHub] zookeeper issue #613: ZOOKEEPER-1823:zkTxnLogToolkit -dump should support pr...

2018-09-12 Thread anmolnar
Github user anmolnar commented on the issue:

https://github.com/apache/zookeeper/pull/613
  
Merged to 3.5 and master. Thanks @maoling !


---


[GitHub] zookeeper pull request #613: ZOOKEEPER-1823:zkTxnLogToolkit -dump should sup...

2018-09-12 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] zookeeper issue #605: [ZOOKEEPER-3125] Fixing pzxid consistent issue when re...

2018-09-12 Thread anmolnar
Github user anmolnar commented on the issue:

https://github.com/apache/zookeeper/pull/605
  
@lvfangmin Committed to master. Conflicting with branch-3.5, please create 
separate pull request for that.


---


[GitHub] zookeeper pull request #605: [ZOOKEEPER-3125] Fixing pzxid consistent issue ...

2018-09-12 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...

2018-09-12 Thread anmolnar
Github user anmolnar commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/590#discussion_r216973199
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/watch/WatchManagerOptimized.java ---
@@ -0,0 +1,355 @@
+/**
+ * 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.server.watch;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Set;
+import java.util.Iterator;
+import java.lang.Iterable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.Watcher.Event.EventType;
+import org.apache.zookeeper.Watcher.Event.KeeperState;
+import org.apache.zookeeper.server.ServerCnxn;
+import org.apache.zookeeper.server.util.BitMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Optimized in memory and time complexity, compared to WatchManager, both 
the
+ * memory consumption and time complexity improved a lot, but it cannot
+ * efficiently remove the watcher when the session or socket is closed, for
+ * majority usecase this is not a problem.
+ *
+ * Changed made compared to WatchManager:
+ *
+ * - Use HashSet and BitSet to store the watchers to find a balance between
+ *   memory usage and time complexity
+ * - Use ReadWriteLock instead of synchronized to reduce lock retention
+ * - Lazily clean up the closed watchers
+ */
+public class WatchManagerOptimized
+implements IWatchManager, DeadWatcherListener {
+
+private static final Logger LOG =
+LoggerFactory.getLogger(WatchManagerOptimized.class);
+
+private final ConcurrentHashMap pathWatches =
+new ConcurrentHashMap();
+
+// watcher to bit id mapping
+private final BitMap watcherBitIdMap = new BitMap();
+
+// used to lazily remove the dead watchers
+private final WatcherCleaner watcherCleaner;
+
+private final ReentrantReadWriteLock addRemovePathRWLock = new 
ReentrantReadWriteLock();
+
+public WatchManagerOptimized() {
+watcherCleaner = new WatcherCleaner(this);
+watcherCleaner.start();
+}
+
+@Override
+public boolean addWatch(String path, Watcher watcher) {
+boolean result = false;
+addRemovePathRWLock.readLock().lock();
+try {
+// avoid race condition of adding a on flying dead watcher
+if (isDeadWatcher(watcher)) {
+LOG.debug("Ignoring addWatch with closed cnxn");
+} else {
+Integer bit = watcherBitIdMap.add(watcher);
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null) {
+watchers = new BitHashSet();
+BitHashSet existingWatchers = 
pathWatches.putIfAbsent(path, watchers);
+if (existingWatchers != null) {
+watchers = existingWatchers;
+}
+}
+result = watchers.add(bit);
+}
+} finally {
+addRemovePathRWLock.readLock().unlock();
+}
+return result;
+}
+
+@Override
+public boolean containsWatcher(String path, Watcher watcher) {
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null || 
!watchers.contains(watcherBitIdMap.getBit(watcher))) {
+return false;
+}
+return true;
+ 

Re: ZooKeeper 3.5 blocker issues

2018-09-12 Thread Andor Molnar
Fangmin,

Sorry, I just noticed that you want to include the consistency fixes in the 
stable version which is fine. Let’s finish the backports and we’ll be done with 
them.

ZOOKEEPER-3114 is essentially a new feature, I wouldn’t block 3.5 with that. 
What do you think?

Andor



> On 2018. Sep 12., at 11:52, Andor Molnar  wrote:
> 
> Cool, thanks for the clarification.
> 
> The updated list is as follows:
> 
> - ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
> - ZOOKEEPER-1818 (Fix don't care for trunk)
> - ZOOKEEPER-2778 (Potential server deadlock between follower sync with leader 
> and follower receiving external connection requests.)
> 
> The following are not critical and no blockers for the stable release:
> 
> Waiting for to be ported to 3.5:
> - ZOOKEEPER-3104
> - ZOOKEEPER-3125
> - ZOOKEEPER-3127
> 
> New feature:
> - ZOOKEEPER-3114 (fixes ZOOKEEPER-2184 too)
> 
> Regards,
> Andor
> 
> 
> 
>> On 2018. Sep 12., at 0:42, Fangmin Lv  wrote:
>> 
>> Hi Andor,
>> 
>> That's the on disk txn feature, which was disabled internally after we
>> found the potentially inconsistent issue. The only solution we have for now
>> is waiting for the new digest checking feature I mentioned in
>> ZOOKEEPER-3114.
>> 
>> I think there are some other critical consistent issues we just fixed on
>> master recently: ZOOKEEPER-3104, ZOOKEEPER-3125, ZOOKEEPER-3127, I think we
>> should include that in the official 3.5 release as well.
>> 
>> Thanks,
>> Fangmin
>> 
>> On Tue, Sep 11, 2018 at 11:58 AM Andor Molnár  wrote:
>> 
>>> Hi Jeelani,
>>> 
>>> 
>>> Thanks for letting me know. I'm happy to remove it from the list to get
>>> closer to a stable release. :)
>>> 
>>> What's the feature which can be disabled to avoid data inconsistency?
>>> 
>>> 
>>> Andor
>>> 
>>> 
>>> 
>>> On 09/10/2018 11:33 PM, Mohamed Jeelani wrote:
 Thanks Andor for compiling this. Should we be ignoring ZOOKEEPER-2418 as
>>> well? This exists in 3.4 as well and the feature can be disabled. We are
>>> working on a longer term fix for it in 3.6.
 
 Regards,
 
 Jeelani
 
 On 9/10/18, 5:19 AM, "Andor Molnar"  wrote:
 
   Fine.
 
   I'm happy to ignore 1549, 2846 and 2930. Still we have the list of:
 
   - ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
   - ZOOKEEPER-1818 (Fix don't care for trunk)
   - ZOOKEEPER-2418 (txnlog diff sync can skip sending some
>>> transactions to
   followers)
   - ZOOKEEPER-2778 (Potential server deadlock between follower sync
>>> with
   leader and follower receiving external connection requests.)
 
   SSL (ZK-236) is a feature which essential for the 3.5 release, hence
>>> I
   wouldn't leave it out or postpone it for the next stable release. PR
>>> has
   been out for a long time, get on reviewing please.
   The rest are also long outstanding issues which have been found in
>>> the 3.5
   branch.
   ZK-1818 is something which was found in 3.4 and fixed in 3.4, but
>>> never has
   been fixed in 3.5. Quite a serious issue if still present.
 
   I think we should at least run some manual testing and see if we
>>> could
   repro any of these issues before going ahead with a stable release.
 
   Regards,
   Andor
 
 
 
 
   On Fri, Sep 7, 2018 at 3:24 AM, Michael Han  wrote:
 
> I haven't went through the entire list, but looks like lots of the
>>> JIRA
> issues listed in this thread, such as ZOOKEEPER-1549, 2846, also
>>> affects
> 3.4 releases. Should we scope these issues out?
> 
> I think historically the single outstanding blocking issue for a
>>> stable 3.5
> release is the reconfig feature and security concerns around it
>>> (somehow
> addressed in ZOOKEEPER-2014), and the alpha and beta releases were
>>> created
> to stabilize that feature.
> 
> 
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__zookeeper-2Duser.578899.n2.nabble.com_Zookeeper-2Dwith-2D=DwIBaQ=5VD0RTtNlTh3ycd41b3MUw=Vl4oKanLQehvaulUvoKg8A=wqlhnot9c-pQLdkGkccSGNpELUNUnB-wy_h0iA3PRqI=_tGtL3nMWtuPrXKXDx27AIWOzyyT7W-CjIVLDFZwT0E=
> SSL-release-date-tt7581744.html
> 
> So it looks like we are in good shape to release. Something might
>>> worth
> doing to claim the quality of 3.5 is on par with 3.4
> 
> * Run Jepsen on 3.5 - 3.4 passed the test for the record
> 
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__aphyr.com_posts_291-2Djepsen-2Dzookeeper=DwIBaQ=5VD0RTtNlTh3ycd41b3MUw=Vl4oKanLQehvaulUvoKg8A=wqlhnot9c-pQLdkGkccSGNpELUNUnB-wy_h0iA3PRqI=VjORkX5s7hrJyl8mW9Q4cfeSWF4qfTdyRjcuAiBt0y4=
> * Fix all flaky tests on 3.5 - 3.4 has little or no flaky tests at
>>> all.
> 
> 
> On Tue, Sep 4, 2018 at 1:48 AM, Andor Molnar
>>> 
> wrote:
> 
>> Thanks Maoling! That would be huge help, I appreciate it.
>> 
>> Andor
>> 
> 
 
 
>>> 
>>> 
> 



Re: ZooKeeper 3.5 blocker issues

2018-09-12 Thread Andor Molnar
Cool, thanks for the clarification.

The updated list is as follows:

- ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
- ZOOKEEPER-1818 (Fix don't care for trunk)
- ZOOKEEPER-2778 (Potential server deadlock between follower sync with leader 
and follower receiving external connection requests.)

The following are not critical and no blockers for the stable release:

Waiting for to be ported to 3.5:
- ZOOKEEPER-3104
- ZOOKEEPER-3125
- ZOOKEEPER-3127

New feature:
- ZOOKEEPER-3114 (fixes ZOOKEEPER-2184 too)

Regards,
Andor



> On 2018. Sep 12., at 0:42, Fangmin Lv  wrote:
> 
> Hi Andor,
> 
> That's the on disk txn feature, which was disabled internally after we
> found the potentially inconsistent issue. The only solution we have for now
> is waiting for the new digest checking feature I mentioned in
> ZOOKEEPER-3114.
> 
> I think there are some other critical consistent issues we just fixed on
> master recently: ZOOKEEPER-3104, ZOOKEEPER-3125, ZOOKEEPER-3127, I think we
> should include that in the official 3.5 release as well.
> 
> Thanks,
> Fangmin
> 
> On Tue, Sep 11, 2018 at 11:58 AM Andor Molnár  wrote:
> 
>> Hi Jeelani,
>> 
>> 
>> Thanks for letting me know. I'm happy to remove it from the list to get
>> closer to a stable release. :)
>> 
>> What's the feature which can be disabled to avoid data inconsistency?
>> 
>> 
>> Andor
>> 
>> 
>> 
>> On 09/10/2018 11:33 PM, Mohamed Jeelani wrote:
>>> Thanks Andor for compiling this. Should we be ignoring ZOOKEEPER-2418 as
>> well? This exists in 3.4 as well and the feature can be disabled. We are
>> working on a longer term fix for it in 3.6.
>>> 
>>> Regards,
>>> 
>>> Jeelani
>>> 
>>> On 9/10/18, 5:19 AM, "Andor Molnar"  wrote:
>>> 
>>>Fine.
>>> 
>>>I'm happy to ignore 1549, 2846 and 2930. Still we have the list of:
>>> 
>>>- ZOOKEEPER-236 (SSL/TLS support for Atomic Broadcast protocol)
>>>- ZOOKEEPER-1818 (Fix don't care for trunk)
>>>- ZOOKEEPER-2418 (txnlog diff sync can skip sending some
>> transactions to
>>>followers)
>>>- ZOOKEEPER-2778 (Potential server deadlock between follower sync
>> with
>>>leader and follower receiving external connection requests.)
>>> 
>>>SSL (ZK-236) is a feature which essential for the 3.5 release, hence
>> I
>>>wouldn't leave it out or postpone it for the next stable release. PR
>> has
>>>been out for a long time, get on reviewing please.
>>>The rest are also long outstanding issues which have been found in
>> the 3.5
>>>branch.
>>>ZK-1818 is something which was found in 3.4 and fixed in 3.4, but
>> never has
>>>been fixed in 3.5. Quite a serious issue if still present.
>>> 
>>>I think we should at least run some manual testing and see if we
>> could
>>>repro any of these issues before going ahead with a stable release.
>>> 
>>>Regards,
>>>Andor
>>> 
>>> 
>>> 
>>> 
>>>On Fri, Sep 7, 2018 at 3:24 AM, Michael Han  wrote:
>>> 
 I haven't went through the entire list, but looks like lots of the
>> JIRA
 issues listed in this thread, such as ZOOKEEPER-1549, 2846, also
>> affects
 3.4 releases. Should we scope these issues out?
 
 I think historically the single outstanding blocking issue for a
>> stable 3.5
 release is the reconfig feature and security concerns around it
>> (somehow
 addressed in ZOOKEEPER-2014), and the alpha and beta releases were
>> created
 to stabilize that feature.
 
 
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__zookeeper-2Duser.578899.n2.nabble.com_Zookeeper-2Dwith-2D=DwIBaQ=5VD0RTtNlTh3ycd41b3MUw=Vl4oKanLQehvaulUvoKg8A=wqlhnot9c-pQLdkGkccSGNpELUNUnB-wy_h0iA3PRqI=_tGtL3nMWtuPrXKXDx27AIWOzyyT7W-CjIVLDFZwT0E=
 SSL-release-date-tt7581744.html
 
 So it looks like we are in good shape to release. Something might
>> worth
 doing to claim the quality of 3.5 is on par with 3.4
 
 * Run Jepsen on 3.5 - 3.4 passed the test for the record
 
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__aphyr.com_posts_291-2Djepsen-2Dzookeeper=DwIBaQ=5VD0RTtNlTh3ycd41b3MUw=Vl4oKanLQehvaulUvoKg8A=wqlhnot9c-pQLdkGkccSGNpELUNUnB-wy_h0iA3PRqI=VjORkX5s7hrJyl8mW9Q4cfeSWF4qfTdyRjcuAiBt0y4=
 * Fix all flaky tests on 3.5 - 3.4 has little or no flaky tests at
>> all.
 
 
 On Tue, Sep 4, 2018 at 1:48 AM, Andor Molnar
>> 
 wrote:
 
> Thanks Maoling! That would be huge help, I appreciate it.
> 
> Andor
> 
 
>>> 
>>> 
>> 
>> 



Re: Java version (Oracle - OpenJDK) support

2018-09-12 Thread Norbert Kalmar
Thanks Enrico!

Agree, as I mentioned, only JDK8 and 11 should be tested on 3.4 and other
branches as well.

I checked the Kerby problems, 3.4 does not have Kerby, it uses Apache
directory server.
Maybe we should introduce also introduce Kerby on 3.4? Or just try to fix
the problems with directory server.

Regards,
Norbert

On Wed, Sep 12, 2018 at 11:22 AM Enrico Olivelli 
wrote:

> Il giorno mer 12 set 2018 alle ore 11:04 Norbert Kalmar
>  ha scritto:
>
> > Hi all,
> >
> > Oracle8 will have it's support end in January. They changed there release
> > drastically.
> > A good article on that:
> > https://dev.karakun.com/java/2018/06/25/java-releases.html
> >
> > Long story short: From January, no Oracle JDK version can be used in PROD
> > environment without a license. End every release, even LTS (next one is
> > version 11) will only have a 6 month public update period.
> >
> > We should also decide on the supported versions of Java.
> >
> > My opinion: We should make sure ZK is compatible with Oracle 8 and 11,
> and
> > also openJDK 8 and 11.
> >
> > But after that, every 6 month, there will be a new Oracle Java version
> > which we should support.
> >
> > What do you think? What version to support? What about 3.4 now that 3.5
> is
> > getting close to stable? (I think fix 3.4 on Oracle 11 and that's it -
> 3.5
> > stable should be out by the time 12 comes out).
> >
>
> As far as I know ZK is running fine on JDK11, even 3.4.
> We have a problem with Kerberos tests on 3.4, but we can fix them.
>
>
> I can add that as far as I know there will not be any 'Oracle JDK 12" GA,
> but only OpenJDK will be released to GA from Oracle
>
>
> >
> > Once we have an agreement, we should create jira's to fix Java11
> problems.
> >
>
> Ok to me
>
> We can consider also dropping support for JDK6 on 3.4 branch, this is
> actually the problem
>
> Enrico
>
>
> > Regards,
> > Norbert
> >
>


Re: Java version (Oracle - OpenJDK) support

2018-09-12 Thread Enrico Olivelli
Il giorno mer 12 set 2018 alle ore 11:04 Norbert Kalmar
 ha scritto:

> Hi all,
>
> Oracle8 will have it's support end in January. They changed there release
> drastically.
> A good article on that:
> https://dev.karakun.com/java/2018/06/25/java-releases.html
>
> Long story short: From January, no Oracle JDK version can be used in PROD
> environment without a license. End every release, even LTS (next one is
> version 11) will only have a 6 month public update period.
>
> We should also decide on the supported versions of Java.
>
> My opinion: We should make sure ZK is compatible with Oracle 8 and 11, and
> also openJDK 8 and 11.
>
> But after that, every 6 month, there will be a new Oracle Java version
> which we should support.
>
> What do you think? What version to support? What about 3.4 now that 3.5 is
> getting close to stable? (I think fix 3.4 on Oracle 11 and that's it - 3.5
> stable should be out by the time 12 comes out).
>

As far as I know ZK is running fine on JDK11, even 3.4.
We have a problem with Kerberos tests on 3.4, but we can fix them.


I can add that as far as I know there will not be any 'Oracle JDK 12" GA,
but only OpenJDK will be released to GA from Oracle


>
> Once we have an agreement, we should create jira's to fix Java11 problems.
>

Ok to me

We can consider also dropping support for JDK6 on 3.4 branch, this is
actually the problem

Enrico


> Regards,
> Norbert
>


Success: ZOOKEEPER- PreCommit Build #2154

2018-09-12 Thread Apache Jenkins Server
Build: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154/

###
## LAST 60 LINES OF THE CONSOLE 
###
[...truncated 80.59 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/2154//testReport/
 [exec] Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
 [exec] Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154//console
 [exec] 
 [exec] This message is automatically generated.
 [exec] 
 [exec] 
 [exec] 
==
 [exec] 
==
 [exec] Adding comment to Jira.
 [exec] 
==
 [exec] 
==
 [exec] 
 [exec] 
 [exec] Comment with id 16611802 added to ZOOKEEPER-1823.
 [exec] Session logged out. Session was 
JSESSIONID=B6912B6F37316B5AEBF35BFD8BB50070.
 [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: 18 minutes 29 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-1823
Putting comment on the pull request
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

[jira] [Commented] (ZOOKEEPER-1823) zkTxnLogToolkit -dump should support printing transaction data as a string

2018-09-12 Thread Hadoop QA (JIRA)


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

Hadoop QA commented on ZOOKEEPER-1823:
--

+1 overall.  GitHub Pull Request  Build
  

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

+0 tests included.  The patch appears to be a documentation patch that 
doesn't require tests.

+1 javadoc.  The javadoc tool did not generate any warning messages.

+1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

+1 findbugs.  The patch does not introduce any new Findbugs (version 3.0.1) 
warnings.

+1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

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

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

Test results: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build/2154//console

This message is automatically generated.

> zkTxnLogToolkit -dump should support printing transaction data as a string
> --
>
> Key: ZOOKEEPER-1823
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1823
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Raul Gutierrez Segales
>Assignee: maoling
>Priority: Trivial
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-1823.patch
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Some times it's handy to have LogFormatter show you the content of the 
> transactions (i.e.: if you are storing text).



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


[jira] [Commented] (ZOOKEEPER-3125) Pzxid inconsistent issue when replaying a txn for a deleted node

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar commented on ZOOKEEPER-3125:
-

Scoped to 3.5 branch too.

> Pzxid inconsistent issue when replaying a txn for a deleted node
> 
>
> Key: ZOOKEEPER-3125
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3125
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> When taking snapshot or syncing snapshot from leader, it's having fuzzy 
> snapshot, which means the parent node might already serialized before the 
> child get deleted, during replay the txn it will skip update the parent pzxid 
> in this case, which will cause inconsistency.



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


[jira] [Updated] (ZOOKEEPER-3125) Pzxid inconsistent issue when replaying a txn for a deleted node

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar updated ZOOKEEPER-3125:

Fix Version/s: 3.5.5

> Pzxid inconsistent issue when replaying a txn for a deleted node
> 
>
> Key: ZOOKEEPER-3125
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3125
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Major
>  Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> When taking snapshot or syncing snapshot from leader, it's having fuzzy 
> snapshot, which means the parent node might already serialized before the 
> child get deleted, during replay the txn it will skip update the parent pzxid 
> in this case, which will cause inconsistency.



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


Java version (Oracle - OpenJDK) support

2018-09-12 Thread Norbert Kalmar
Hi all,

Oracle8 will have it's support end in January. They changed there release
drastically.
A good article on that:
https://dev.karakun.com/java/2018/06/25/java-releases.html

Long story short: From January, no Oracle JDK version can be used in PROD
environment without a license. End every release, even LTS (next one is
version 11) will only have a 6 month public update period.

We should also decide on the supported versions of Java.

My opinion: We should make sure ZK is compatible with Oracle 8 and 11, and
also openJDK 8 and 11.

But after that, every 6 month, there will be a new Oracle Java version
which we should support.

What do you think? What version to support? What about 3.4 now that 3.5 is
getting close to stable? (I think fix 3.4 on Oracle 11 and that's it - 3.5
stable should be out by the time 12 comes out).

Once we have an agreement, we should create jira's to fix Java11 problems.

Regards,
Norbert


[jira] [Commented] (ZOOKEEPER-3127) Fixing potential data inconsistency due to update last processed zxid with partial multi-op txn

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar commented on ZOOKEEPER-3127:
-

[~lvfangmin]

Would you please port this to 3.5 branch as well?

> Fixing potential data inconsistency due to update last processed zxid with 
> partial multi-op txn
> ---
>
> Key: ZOOKEEPER-3127
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3127
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Found this issue while checking the code for another issue, this is a 
> relatively rare case which we haven't seen it on prod so far.
> Currently, the lastProcessedZxid is updated when applying the first txn of 
> multi-op, if there is a snapshot in progress, it's possible that the zxid 
> associated with the snapshot only include partial of the multi op.
> When loading snapshot, it will only load the txns after the zxid associated 
> with snapshot file, which could data inconsistency due to missing sub txns.
> To avoid this, we only update the lastProcessedZxid when the whole multi-op 
> txn is applied to DataTree.



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


[jira] [Commented] (ZOOKEEPER-3104) Potential data inconsistency due to NEWLEADER packet being sent too early during SNAP sync

2018-09-12 Thread Andor Molnar (JIRA)


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

Andor Molnar commented on ZOOKEEPER-3104:
-

Thanks [~lvfangmin]

We don't get too many (maybe not at all) data inconsistency reports with 3.4, 
so I would say fixing this in 3.5 additionally would be beneficial for us.

> Potential data inconsistency due to NEWLEADER packet being sent too early 
> during SNAP sync
> --
>
> Key: ZOOKEEPER-3104
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3104
> Project: ZooKeeper
>  Issue Type: Bug
>  Components: server
>Affects Versions: 3.5.4, 3.6.0, 3.4.13
>Reporter: Fangmin Lv
>Assignee: Fangmin Lv
>Priority: Critical
>  Labels: pull-request-available
> Fix For: 3.6.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Currently, in SNAP sync, the leader will start queuing the proposal/commits 
> and the NEWLEADER packet before sending over the snapshot over wire. So it's 
> possible that the zxid associated with the snapshot might be higher than all 
> the packets queued before NEWLEADER.
>  
> When the follower received the snapshot, it will apply all the txns queued 
> before NEWLEADER, which may not cover all the txns up to the zxid in the 
> snapshot. After that, it will write the snapshot out to disk with the zxid 
> associated with the snapshot. In case the server crashed after writing this 
> out, when loading the data from disk, it will use zxid of the snapshot file 
> to sync with leader, and it could cause data inconsistent, because we only 
> replayed partial of the historical data during previous syncing.
>  
> NEWLEADER packet means the learner now has the correct and almost up to data 
> state as leader, so it makes more sense to move the NEWLEADER packet after 
> sending over snapshot, and this is what we did in the fix.
>  
> Besides this, the socket timeout is changed to use smaller sync timeout after 
> received NEWLEADER ack, in high write traffic ensembles with large snapshot, 
> the follower might be timed out by leader before finishing sending over those 
> queued txns after writing snapshot out, which could cause the follower 
> staying in syncing state forever. Move the NEWLEADER packet after sending 
> over snapshot can avoid this issue as well.



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


[GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/590#discussion_r216912996
  
--- Diff: src/java/test/org/apache/zookeeper/server/DumbWatcher.java ---
@@ -0,0 +1,96 @@
+/**
+ * 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.server;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.security.cert.Certificate;
+
+import org.apache.jute.Record;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.proto.ReplyHeader;
+
+public class DumbWatcher extends ServerCnxn {
--- End diff --

I agree from unit test case mock object is easier to maintain than stub 
ones, but I also need this DumbWatcher in the micro benchmark, I'll put this 
class somewhere in the code, so the micro benchmark and unit test can share it.


---


[GitHub] zookeeper pull request #590: [ZOOKEEPER-1177] Add the memory optimized watch...

2018-09-12 Thread lvfangmin
Github user lvfangmin commented on a diff in the pull request:

https://github.com/apache/zookeeper/pull/590#discussion_r216910219
  
--- Diff: 
src/java/main/org/apache/zookeeper/server/watch/WatchManagerOptimized.java ---
@@ -0,0 +1,355 @@
+/**
+ * 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.server.watch;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.BitSet;
+import java.util.HashSet;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Set;
+import java.util.Iterator;
+import java.lang.Iterable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.Watcher.Event.EventType;
+import org.apache.zookeeper.Watcher.Event.KeeperState;
+import org.apache.zookeeper.server.ServerCnxn;
+import org.apache.zookeeper.server.util.BitMap;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Optimized in memory and time complexity, compared to WatchManager, both 
the
+ * memory consumption and time complexity improved a lot, but it cannot
+ * efficiently remove the watcher when the session or socket is closed, for
+ * majority usecase this is not a problem.
+ *
+ * Changed made compared to WatchManager:
+ *
+ * - Use HashSet and BitSet to store the watchers to find a balance between
+ *   memory usage and time complexity
+ * - Use ReadWriteLock instead of synchronized to reduce lock retention
+ * - Lazily clean up the closed watchers
+ */
+public class WatchManagerOptimized
+implements IWatchManager, DeadWatcherListener {
+
+private static final Logger LOG =
+LoggerFactory.getLogger(WatchManagerOptimized.class);
+
+private final ConcurrentHashMap pathWatches =
+new ConcurrentHashMap();
+
+// watcher to bit id mapping
+private final BitMap watcherBitIdMap = new BitMap();
+
+// used to lazily remove the dead watchers
+private final WatcherCleaner watcherCleaner;
+
+private final ReentrantReadWriteLock addRemovePathRWLock = new 
ReentrantReadWriteLock();
+
+public WatchManagerOptimized() {
+watcherCleaner = new WatcherCleaner(this);
+watcherCleaner.start();
+}
+
+@Override
+public boolean addWatch(String path, Watcher watcher) {
+boolean result = false;
+addRemovePathRWLock.readLock().lock();
+try {
+// avoid race condition of adding a on flying dead watcher
+if (isDeadWatcher(watcher)) {
+LOG.debug("Ignoring addWatch with closed cnxn");
+} else {
+Integer bit = watcherBitIdMap.add(watcher);
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null) {
+watchers = new BitHashSet();
+BitHashSet existingWatchers = 
pathWatches.putIfAbsent(path, watchers);
+if (existingWatchers != null) {
+watchers = existingWatchers;
+}
+}
+result = watchers.add(bit);
+}
+} finally {
+addRemovePathRWLock.readLock().unlock();
+}
+return result;
+}
+
+@Override
+public boolean containsWatcher(String path, Watcher watcher) {
+BitHashSet watchers = pathWatches.get(path);
+if (watchers == null || 
!watchers.contains(watcherBitIdMap.getBit(watcher))) {
+return false;
+}
+return true;