zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh R <rake...@huawei.com>
Subject RE: Thread handling
Date Fri, 28 Mar 2014 08:02:14 GMT
Thanks Camille. Then I'll raise an improvement task and will discuss it over there and reach
to an agreement.

Thanks,
Rakesh

-----Original Message-----
From: cf@renttherunway.com [mailto:cf@renttherunway.com] On Behalf Of Camille Fournier
Sent: 27 March 2014 21:53
To: DevZooKeeper
Cc: user@zookeeper.apache.org
Subject: Re: Thread handling

I love the idea. In general, it would be great to uplift the way we do threading. It is a
BIG project though, which is why it hasn't been tackled.
I think this will go best if you have a clear idea of how we can break down the change so
it isn't a several month dev/review process.

C


On Thu, Mar 27, 2014 at 10:38 AM, Rakesh R <rakeshr@huawei.com> wrote:

> Hi All,
>
> Server has many critical threads running and co-ordinating each other 
> like  RequestProcessor chains et. When going through each threads, 
> most of them having the similar structure like:
>
> public void run() {
>         try {
>               while(running)
>                    // processing logic
>               }
>         } catch (InterruptedException e) {
>             LOG.error("Unexpected interruption", e);
>         } catch (RequestProcessorException e) {
>             LOG.error("Unexpected exception", e);
>         } catch (Exception e) {
>             LOG.error("Unexpected exception", e);
>         }
>         LOG.info("...exited loop!");
> }
>
> I feel, we could improve our threads  in our system. From the design I 
> could see, there could be a chance of silently leaving the thread in 
> case of any exception(abnormal or any functional issue too) If this 
> happens in the production, the server would get hanged forever and 
> will not be able to deliver its role.
>
> If we have a 'DeathWatcher 'or some other mechanism in place to 
> monitor all the critical threads. It can take a decision like - bring 
> down the process if required, or shutdown the quorumpeer and go for LE again etc.
> Now the monitoring or management tool will knows about the situation 
> and can act upon.
>
> Appreciate any thoughts ?
>
> Thanks in advance,
> Rakesh R
>

Mime
View raw message