Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # dev >> Re: svn commit: r1225200 - in /zookeeper/trunk: ./ src/java/main/org/apache/zookeeper/server/ src/java/test/org/apache/zookeeper/server/quorum/ src/java/test/org/apache/zookeeper/test/


Copy link to this message
-
Re: svn commit: r1225200 - in /zookeeper/trunk: ./ src/java/main/org/apache/zookeeper/server/ src/java/test/org/apache/zookeeper/server/quorum/ src/java/test/org/apache/zookeeper/test/
I'm not sure it's meaningful enough to be worth the sync overhead. We
should look into that. The alternative if we must is using a proper
concurrent collection. Neha, any thoughts?

C
On Dec 28, 2011 12:45 PM, "Patrick Hunt" <[EMAIL PROTECTED]> wrote:

> I believe there is a bug in this commit. The "cnxns" size() call is
> not being synchronized. This will lead to invalid results at best, at
> worst outright failure (hard to say w/o knowing the implementation of
> HashSet).
>
> Camille can you work with Neha to get this fixed? Perhaps in the
> meantime (if it's going to take a while) you can revert this change,
> re-open the jira, update the patch, and reapply at some later time?
>
> Patrick
>
> On Wed, Dec 28, 2011 at 6:55 AM,  <[EMAIL PROTECTED]> wrote:
> > Author: camille
> > Date: Wed Dec 28 14:55:37 2011
> > New Revision: 1225200
> >
> > URL: http://svn.apache.org/viewvc?rev=1225200&view=rev
> > Log:
> > ZOOKEEPER-1321: Add number of client connections metric in JMX and srvr
> (Neha Narkhede via camille)
> >
> > Modified:
> >    zookeeper/trunk/CHANGES.txt
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NettyServerCnxn.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ServerStats.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerBean.java
> >
>  zookeeper/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServerMXBean.java
> >
>  zookeeper/trunk/src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java
> >
>  zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FourLetterWordsTest.java
> >
> > Modified: zookeeper/trunk/CHANGES.txt
> > URL:
> http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1225200&r1=1225199&r2=1225200&view=diff
> >
> =============================================================================> > --- zookeeper/trunk/CHANGES.txt (original)
> > +++ zookeeper/trunk/CHANGES.txt Wed Dec 28 14:55:37 2011
> > @@ -162,6 +162,8 @@ IMPROVEMENTS:
> >
> >   ZOOKEEPER-1342. quorum Listener & LearnerCnxAcceptor are missing
> >   thread names (Rakesh R via phunt)
> > +
> > +  ZOOKEEPER-1321. Add number of client connections metric in JMX and
> srvr (Neha Narkhede via camille)
> >
> >  Release 3.4.0 -
> >
> >
> > Modified:
> zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
> > URL:
> http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java?rev=1225200&r1=1225199&r2=1225200&view=diff
> >
> =============================================================================> > ---
> zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
> (original)
> > +++
> zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java
> Wed Dec 28 14:55:37 2011
> > @@ -749,7 +749,8 @@ public class NIOServerCnxn extends Serve
> >
> >             print("packets_received", stats.getPacketsReceived());
> >             print("packets_sent", stats.getPacketsSent());
> > -
> > +            print("num_alive_connections",
> stats.getNumAliveClientConnections());
> > +
> >             print("outstanding_requests",
> stats.getOutstandingRequests());
> >
> >             print("server_state", stats.getServerState());
> >
> > Modified:
> zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java
> > URL:
> http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/NIOServerCnxnFactory.java?rev=1225200&r1=1225199&r2=1225200&view=diff
> >
> =============================================================================> > ---