jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OCM-4) requestObjectCache not cleared in ObjectContentManager.getObjectIterator()
Date Wed, 27 Jun 2012 15:01:47 GMT

     [ https://issues.apache.org/jira/browse/OCM-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Ard Schrijvers updated OCM-4:

    Resolution: Duplicate
      Assignee: Ard Schrijvers
        Status: Resolved  (was: Patch Available)

will be fixed as part of OCM-60
> requestObjectCache not cleared in ObjectContentManager.getObjectIterator()
> --------------------------------------------------------------------------
>                 Key: OCM-4
>                 URL: https://issues.apache.org/jira/browse/OCM-4
>             Project: Jackrabbit OCM
>          Issue Type: Bug
>            Reporter: David Franke
>            Assignee: Ard Schrijvers
>         Attachments: OCM-4.patch
> I found this bug using an old snapshot version (1.5-ASF666297), but I had a look at the
sources in the trunk and the implementation has not changed, so I assume it still exists.
> This bug only applies to the two methods Iterator getObjectIterator(...). Collection
getObjects(...) works.
> The method 
> public Object getObject(Session session, String path)
> puts objects in the RequestObjectCache. If an object is already cached it is retrieved
from the cache.
> if (requestObjectCache.isCached(path))
>  {
>         return requestObjectCache.getObject(path);
> }
> In ObjectContentManager.getObjects() this cache is cleared after retrieving the object.
> In ObjectContentManager.getObjectIterator() this is never cleared.
> This makes problems if I make several searches with the same ObjectContentManager while
the data in the repository changes.
> Example:
> UserSearch searches for all user with a given name. 
> An XPath is created like this:  //(*, xy:user)[@name='givenName']
> It always keeps the same instance of ObjectContenManager to call the search until the
session expires:
> userIterator = ocm.getObjectIterator(query,Query.XPATH);
> ...
> In the meantime a user may change his name. When I now search for this new name, the
user is found, but the old user object will be returned (with old name). There is no way to
clear the cache manually. ocm.refresh(false) does not help in this case.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message