[GitHub] [zookeeper] eolivelli commented on issue #952: ZOOKEEPER-3364: Compile with strict options in order to check code quality

2019-05-19 Thread GitBox
eolivelli commented on issue #952: ZOOKEEPER-3364: Compile with strict options 
in order to check code quality
URL: https://github.com/apache/zookeeper/pull/952#issuecomment-493840020
 
 
   @anmolnar 
   This is the port for 3.5 I want to do the same for 3.4.
   The goal is to drop ant based quality checks for 3.5 and master, but this 
part of automatic QA should be shared


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] eolivelli opened a new pull request #952: ZOOKEEPER-3364: Compile with strict options in order to check code quality

2019-05-19 Thread GitBox
eolivelli opened a new pull request #952: ZOOKEEPER-3364: Compile with strict 
options in order to check code quality
URL: https://github.com/apache/zookeeper/pull/952
 
 
   This is the port of ZOOKEEPER-3364 to branch-3.5
   
   - Add extra compiler arguments in order to achieve better code quality.
   - Fix some minor issues reported by javac
   - Extra checks are not enabled in "contrib" module.
   
   Author: Enrico Olivelli 
   
   Reviewers: an...@apache.org
   
   Closes #910 from eolivelli/fix/ZOOKEEPER-3364-javac-strict and squashes the 
following commits:
   
   9660aff82 [Enrico Olivelli] Fix tests and fix warnings on JDK12
   52895ec9d [Enrico Olivelli] ZOOKEEPER-3364 Compile with strict options in 
order to check code quality


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] enixon commented on a change in pull request #899: ZOOKEEPER-3354: Improve efficiency of DeleteAllCommand

2019-05-19 Thread GitBox
enixon commented on a change in pull request #899: ZOOKEEPER-3354: Improve 
efficiency of DeleteAllCommand
URL: https://github.com/apache/zookeeper/pull/899#discussion_r285428907
 
 

 ##
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
 ##
 @@ -45,20 +48,67 @@
  *
  * @throws IllegalArgumentException if an invalid path is specified
  */
-public static void deleteRecursive(ZooKeeper zk, final String pathRoot)
+public static boolean deleteRecursive(ZooKeeper zk, final String pathRoot)
 throws InterruptedException, KeeperException
 {
 PathUtils.validatePath(pathRoot);
 
 List tree = listSubTreeBFS(zk, pathRoot);
 LOG.debug("Deleting " + tree);
 LOG.debug("Deleting " + tree.size() + " subnodes ");
-for (int i = tree.size() - 1; i >= 0 ; --i) {
-//Delete the leaves first and eventually get rid of the root
-zk.delete(tree.get(i), -1); //Delete all versions of the node with 
-1.
+
+int asyncReqRateLimit = 10;
+// Try deleting the tree nodes in batches of size 1000.
+// If some batch failed, try again with batches of size 1 to delete as
+// many nodes as possible.
 
 Review comment:
   Now that batch mode is configurable, this more conservative approach is 
making more sense to me. 
   
   Alternate idea - the tool swallows all errors until it has tried deleting 
every node and then presents all errors as a single aggregate instead of 
halting at the first error and presenting it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Problem with pushing the website - binaries on asf-site branch ?

2019-05-19 Thread Enrico Olivelli
Il dom 19 mag 2019, 20:41 Patrick Hunt  ha scritto:

> In looking at the older versions under content they don't include that
> file. Probably an un-intended side effect of the recent
> changes/improvements around the docs/site. I'd say we should remove them.
> Can you check, I assume there are no links to that file (locally)?
>

Sure.
Anyway we are on git so we can always use 'git revert' :)

Enrico



> Patrick
>
> On Sat, May 18, 2019 at 11:58 PM Enrico Olivelli 
> wrote:
>
> > Hi,
> > While trying to push a new version of the website
> > I was following the guide here [1]
> >
> > But if I build the website locally I get this report from git status
> >
> > deleted:content/doc/r3.4.12/zookeeper-3.4.12.tar.gz
> > deleted:content/doc/r3.4.13/zookeeper-3.4.13.tar.gz
> >
> > It seems that if I commit the whole image of the built website I would
> drop
> > these tgz files. (you can see those files at [2] and [3])
> > IMHO those binaries shouldn't be hosted on the website and we should
> remove
> > them.
> > I will remove them if we agree
> >
> > Cheers
> > Enrico
> >
> > [1] https://cwiki.apache.org/confluence/display/ZOOKEEPER/WebSiteSetup
> > [2]
> https://github.com/apache/zookeeper/tree/asf-site/content/doc/r3.4.13
> > [3]
> https://github.com/apache/zookeeper/tree/asf-site/content/doc/r3.4.12
> >
>


Re: Problem with pushing the website - binaries on asf-site branch ?

2019-05-19 Thread Patrick Hunt
In looking at the older versions under content they don't include that
file. Probably an un-intended side effect of the recent
changes/improvements around the docs/site. I'd say we should remove them.
Can you check, I assume there are no links to that file (locally)?

Patrick

On Sat, May 18, 2019 at 11:58 PM Enrico Olivelli 
wrote:

> Hi,
> While trying to push a new version of the website
> I was following the guide here [1]
>
> But if I build the website locally I get this report from git status
>
> deleted:content/doc/r3.4.12/zookeeper-3.4.12.tar.gz
> deleted:content/doc/r3.4.13/zookeeper-3.4.13.tar.gz
>
> It seems that if I commit the whole image of the built website I would drop
> these tgz files. (you can see those files at [2] and [3])
> IMHO those binaries shouldn't be hosted on the website and we should remove
> them.
> I will remove them if we agree
>
> Cheers
> Enrico
>
> [1] https://cwiki.apache.org/confluence/display/ZOOKEEPER/WebSiteSetup
> [2] https://github.com/apache/zookeeper/tree/asf-site/content/doc/r3.4.13
> [3] https://github.com/apache/zookeeper/tree/asf-site/content/doc/r3.4.12
>


[GitHub] [zookeeper] maoling closed pull request #951: Zookeeper 3301

2019-05-19 Thread GitBox
maoling closed pull request #951: Zookeeper 3301
URL: https://github.com/apache/zookeeper/pull/951
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [zookeeper] maoling opened a new pull request #951: Zookeeper 3301

2019-05-19 Thread GitBox
maoling opened a new pull request #951: Zookeeper 3301
URL: https://github.com/apache/zookeeper/pull/951
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Why does ZooKeeper follower shutdown itself when it can not read from leader

2019-05-19 Thread Qian Zhang
Hi,

I have a ZooKeeper cluster which has 5 nodes. Today the leader cannot be
connected due to a hardware issue, and then I found the 4 followers just
shutdown, here is the logs:

> May 18 15:34:28 MD001076 java[29148]: [myid:1] WARN
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Follower@89] - Exception when
> following the leader
>   java.net.SocketTimeoutException:
> Read timed out
> at
> java.net.SocketInputStream.socketRead0(Native Method)
> at
> java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
> at
> java.net.SocketInputStream.read(SocketInputStream.java:171)
> at
> java.net.SocketInputStream.read(SocketInputStream.java:141)
> at
> java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
> at
> java.io.BufferedInputStream.read(BufferedInputStream.java:265)
> at
> java.io.DataInputStream.readInt(DataInputStream.java:387)
> at
> org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
> at
> org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:83)
> at
> org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:99)
> at
> org.apache.zookeeper.server.quorum.Learner.readPacket(Learner.java:153)
> at
> org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:85)
> at
> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:937)
> May 18 15:34:28 MD001076 java[29148]: [myid:1] INFO  [NIOServerCxn.Factory:
> 0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connectio
> n from /10.249.255.10:42306
> May 18 15:34:28 MD001076 java[29148]: [myid:1] WARN  [NIOServerCxn.Factory:
> 0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old cl
> ient /10.249.255.10:42306; will be dropped if server is in r-o mode
> May 18 15:34:28 MD001076 java[29148]: [myid:1] INFO  [NIOServerCxn.Factory:
> 0.0.0.0/0.0.0.0:2181:ZooKeeperServer@942] - Client attempting to establish
>  new session at /10.249.255.10:42306
> May 18 15:34:28 MD001076 java[29148]: [myid:1] ERROR
> [FollowerRequestProcessor:1:ZooKeeperCriticalThread@49] - Severe
> unrecoverable error, from threa
> d : FollowerRequestProcessor:1
>   java.net.SocketException: Socket
> closed
> at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
> at
> java.net.SocketOutputStream.write(SocketOutputStream.java:155)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
> at
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
> at
> org.apache.zookeeper.server.quorum.Learner.writePacket(Learner.java:139)
> at
> org.apache.zookeeper.server.quorum.Learner.request(Learner.java:188)
> at
> org.apache.zookeeper.server.quorum.FollowerRequestProcessor.run(FollowerRequestProcessor.java:90)
> May 18 15:34:28 MD001076 java[29148]: [myid:1] INFO
> [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:Follower@166] - shutdown called
>   java.lang.Exception: shutdown
> Follower
> at
> org.apache.zookeeper.server.quorum.Follower.shutdown(Follower.java:166)
> at
> org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:941)


I am confused why all followers shutdown in this case which makes the whole
ZooKeeper unusable for a short period, shouldn't they elect a new leader
instead? Thanks!


Regards,
Qian Zhang