jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Belrose <kafe...@gmail.com>
Subject Re: Infinite loop in Jackrabbit after database disconnection.
Date Tue, 31 Aug 2010 12:35:47 GMT
Hi Jukka,

Thanks for the prompt reply.

On Sun, Aug 29, 2010 at 7:44 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> On Fri, Aug 27, 2010 at 12:59 PM, Guillaume Belrose <kafecho@gmail.com> wrote:
>> While the database is running, I create 10 nodes directly under the
>> repository root. Each node creation operation is done within a
>> dedicated short-lived session. All works fine. Then I stop the
>> database and try to create a node under the repository root node.
>> JackRabbit gets stuck into an infinite loop of exceptions.
>>
>> Any clues as to why this is happening? (See exception trace at the end
>> of this message).
>
> Is this really an infinite loop or just a sequence of multiple error
> log entries?
>

Sorry, I may have abused the English language here. I was in fact
observing a very long list of exceptions.

> By default Jackrabbit will retry a failed database operation once, so
> you'll end up with two error log entries per failed operation from the
> ConnectionHelper class. Then higher up that same exception gets caught
> by BundleDbPersistenceManager that logs an "failed to read bundle"
> error message and rethrows the exception as an ItemStateException.
>
> This exception is then caught by the SharedItemStateManager that then
> proceeds to cancel the ongoing operation. Unfortunately this cancel
> step will currently also try to access the underlying persistence
> store (read access only), which causes another set of exceptions and
> error log messages. We probably should handle such situations more
> gracefully.
>

Yes I had a look at the exception trace and saw something like that
was taking place. It would be nice to handle such corner cases more
gracefully. I did a re-run of my test this morning, and it took over
54 seconds for JackRabbit to eventually give up trying to connect to
the database and report the error (I run a quad core 3Ghz machine
which is pretty fast). 54 seconds is quite a long time especially from
the end-user perspective. I am not including the stack trace in this
email, but let me know if it might be useful to you.

> Finally these errors result in an RepositoryException that gets thrown
> to the client application. This process results in lots of errors
> being logged, but as far as I can tell should not cause an infinite
> loop. Does your application have a retry feature after receiving a
> RepositoryException?
>
> BR,

You are right, I had some retry logic in my code which is now deprecated.

> Jukka Zitting
>

Mime
View raw message