jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1428) Add API for selective bundle consistency check (Jackrabbit-specific)
Date Fri, 29 Feb 2008 10:02:51 GMT

    [ https://issues.apache.org/jira/browse/JCR-1428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573656#action_12573656

Alexander Klimetschek commented on JCR-1428:

> Why are the consistency check method needed on RepositoryImpl?

To build a tool that can call this programmatically. The configuration based variant needs
a restart and fiddling with workspace.xml

> Consistency checking a large workspace is a heavy weight operation that may have performance

I improved the check so that it allows you to specify single nodes via uuids.

> Shouldn't such an operation only be allowed to an admin user (-> login required)?

Makes sense. How would I check this inside RepositoryImpl?

> > [...] problems with cache coherence and other such stuff.
> why exactly is that an issue? the consistency check works on the persistence manager
level, which does not know about transient changes?

Cached bundles that get deleted by the consistency check on the database level will lead to
problems. The cache needs to be invalidated. This is still an open issue...

> > to clean up the versioning "workspace", pass "jcr:system" as workspace name
> I would rather use the uuid of the jcr:system node and the method checkConsistency(String[]
uuids, boolean)

RepositoryImpl just calls the consistency check on the persistence manager. Therefore you
can specify the workspace in the checkConsistency() methods that will select the PM of the
chosen workspace. It was natural to select the versioning PM with a special name then.

I am open for another solution. My question at this point: The versioning PM stores all versions
for all workspaces, right? If the nodes in the versioning space have backreferences to the
workspace nodes, they have to be global?

> checkConsistency(String[] uuids) is a convenience method, right? I'd remove that one.

Yes, the only one really needed is RepositoryImpl.consistencyCheck(String workspace, String[]
uuids, boolean recursive, boolean fix). The other methods in RepositoryImpl and WorkspaceImpl
are for convenience (entire workspace check is done via uuids=null).

Shall I go for developer convenience or axiomatic, ie. minimalistic approach here?

> Add API for selective bundle consistency check (Jackrabbit-specific)
> --------------------------------------------------------------------
>                 Key: JCR-1428
>                 URL: https://issues.apache.org/jira/browse/JCR-1428
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-core
>            Reporter: Alexander Klimetschek
>             Fix For: 1.3.4
> Add a jackrabbit-specific API for doing a selective consistencyCheck, ie. on single nodes.
The current entire-workspace check can be very slow if there workspace is large enough. Also
it should be easy to write a tool to invoke that feature programmatically rather than by configuration
+ restart (see below).
> Existing Implementation:
> The current bundle consistencyCheck feature is enabled by setting a bundle PM parameter
and restarting Jackrabbit, it will then run upon startup (see JCR-972 for the only issue regarding
bundle consistency check). This check looks for broken parent-child relationships, ie. it
will remove any child node entries that reference non-existing parent nodes. For non-existing
parent UUIDs and other problems in bundles it will log those.
> Outlook:
> An advanced consistencyCheck could also check for non-existing version nodes and vice-versa
(see JCR-630), but this is not the focus of this issue and could be a later addition to the

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message