jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Infinite loop in Jackrabbit after database disconnection.
Date Sun, 29 Aug 2010 18:44:16 GMT
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?

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.

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,

Jukka Zitting

Mime
View raw message