[Neo] Interrupts

Neil Ellis neil.ellis at peepwl.com
Thu Jul 30 22:07:29 CEST 2009


Cool,

Thanks as ever Johan.

ATB
Neil
On 30 Jul 2009, at 20:03, Johan Svensson wrote:

> You are right, we should change that generic one to a specific runtime
> exception. Will look into that during our exception refactoring.
>
> -Johan
>
> On Thu, Jul 30, 2009 at 8:51 PM, Neil Ellis<neil.ellis at peepwl.com>  
> wrote:
>> Hi Johan
>>
>> I meant the application is being shutdown (not neo.shutdown()) :-) -
>> though I understand the confusion. So as part of our shutdown process
>> we will tell all active threads to stop by interrupting them. When
>> they've all stopped I'll shutdown Neo.
>>
>> So the thread this code runs in is receiving an interrupt, however  
>> Neo
>> is converting the exception into a generic RuntimeException. Which
>> makes it very hard to catch, with the code being like this it makes  
>> it
>> very hard for me to request a thread interruption and then deal with
>> the consequences (i.e. a RuntimeException does not tell me that the
>> thread has been interrupted, so I don't know whether to report an
>> error and continue - or to end the loop it is in).
>>
>> Thanks as always
>> Neil
>>
>> On 30 Jul 2009, at 19:45, Johan Svensson wrote:
>>
>>> Hi Neil,
>>>
>>> Yes, there are a lot of error messages that needs to be improved. On
>>> the other hand the documentation should state that calling any Neo4j
>>> API operation after (or concurrently with) NeoService.shutdown() is
>>> not valid. Adding a flag to check if running is not an option  
>>> because
>>> of performance issues. Could be that there are certain places we  
>>> could
>>> throw a better exception with a better message to help the user  
>>> narrow
>>> down what is wrong. We are planing to do a refactoring of the low
>>> level exceptions before 1.0 final and we will keep this in mind  
>>> then.
>>>
>>> Regards,
>>> Johan
>>>
>>> On Thu, Jul 23, 2009 at 2:14 AM, Neil
>>> Ellis<neil.ellis at mangala.co.uk> wrote:
>>>> Hi guys, if a thread gets interrupted (i.e. during a shutdown), I  
>>>> end
>>>> up with a RuntimeException, I think it would be better to bubble
>>>> something meaningful. What do you think?
>>>>
>>>> java.lang.RuntimeException:
>>>> org.neo4j.impl.nioneo.store.StoreFailureException: Unable to load
>>>> position[24058922] @[601473050]...
> _______________________________________________
> Neo mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user



More information about the User mailing list