On Fri, Sep 28, 2012 at 10:29 PM, Paul Libbrecht <paul(a)hoplahup.net> wrote:
So it appears that the bug was solved by adjusting our notification listener to ignore
notifications when a LazyXWikiDocument is used. This prevents the LazyXWikiDocument to be
put in the cache.
This does not seems documented but I seem to observe that LazyXWikiDocument is in
notifications when that notification is coming from outside.
Do I have another way to recognize it?
The canonical way to check if you are called by a remote event is by
using the component
org.xwiki.observation.remote.RemoteObservationManagerContex#isRemoteState()
(from xwiki-platform-observation-remote).
LazyXWikiDocument is what is used when emulating a document event from
the remote observation module. It's actually supposed to behave like a
XWikiDocument except that it actually load the document from the
database only if something actually need to manipulate it. The only
thing for which it's not supposed to work well is if you try to save
it directly but it's not recommended for a document coming in a local
event anyway since it's creating an events mess. So unless you really
have a specific logic that need to do different things from local and
remote events the best would be that we fix what's wrong with
LazyXWikiDocument in your use case.
thanks in advance
Paul
It should not, a document event for example is
send after the document
is saved in the database so if you react to this event you can't
invalidate the cache too early.
IMO there is only two possibilities here:
* the listener that is supposed to invalidate the cache does not
receive the event for some reason
* there is no such listener or it's buggy
When you can reproduce the issue the idea would
be to find what is the cache with the issue, it's not always easy to find out when you
don't know exactly all the caches but you can view all of
them using JMX (see
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Monitoring#HXWikiCaches…),
at least all the caches created through standard XWiki cache module.
Thus far, any such inconsistency, on production environments, is solved with a
cache-clear so this is likely.
I could find out by just emptying one or the other right?
Indeed.
paul
--
Thomas Mortagne
_______________________________________________
xclams-devs mailing list
xclams-devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/xclams-devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne