Re: IllegalStateException in DataRowStore (thrown by LRUMap)

From: Bryan Lewis (brya..aine.rr.com)
Date: Mon Jun 19 2006 - 11:02:16 EDT

  • Next message: Arturo Perez: "Re: Problem traversing relationships - need hint"

    Sorry I can't be of more help. The exception happened to us only once.
    I rechecked the log but I don't see anything unusual... the number of
    users was high but not abnormal (56 users is high-ish for us). It
    happened on a normal SelectQuery with a single matchExp, an ordering and
    a fetchLimit, fetching from a simple flat entity -- eight attributes
    with no relationships. I suspect it's some intermittent timing/race
    thing. Maybe let your JMeter test run for a week?

    Andrus Adamchik wrote:

    > I did some research of CAY-565 over the weekend. Unfortunately I
    > can't reproduce the issue.
    >
    > I wrote a test case that randomly performs one of the operations -
    > select; insert of an object with relationship; object update; object
    > delete with relationship. Running up to 30 parallel request threads
    > with JMeter, I don't see any exceptions except for occasional fault
    > failures (that are expected under these test conditions as I don't
    > lock the objects). I even found and fixed an unrelated deadlock that
    > I am sure nobody has ever seen in the wild (CAY-573)... still can't
    > reproduce the LRUMap problem.
    >
    > I'll try to change the test conditions, but if Bryan or Lothar (two
    > people who have experienced the issue) have any more insights on the
    > ways to reproduce it, please share.
    >
    > Andrus
    >
    >
    > On Jun 16, 2006, at 1:27 PM, Andrus Adamchik wrote:
    >
    >> On Jun 16, 2006, at 1:12 PM, Lothar Krenzien wrote:
    >>
    >>> I did it yesterday and now I'm getting the already known NPE again.
    >>> And I'm sure that I didn't changed the cayenne version. But what I
    >>> saw is that in the case of NPE always the same method of me is called.
    >>
    >>
    >> Very very strange... so this would confirm a suspicion that there is
    >> a bug in the LRUMap not related to synchronization.
    >>
    >>
    >>> Another question :
    >>> I have a class which is extended from 'WebApplicationListener'. In
    >>> the method 'sessionDestroyed' the following code is executed :
    >>>
    >>> ObjectStore objectStore = dctx.getObjectStore();
    >>> objectStore.objectsInvalidated(objectStore.getObjects());
    >>>
    >>> It that really neccessary ?
    >>
    >>
    >> It may or may not be useful. On the one hand, the ObjectStore is
    >> about to go out of scope at this point, so it (and all its objects)
    >> will be garbage collected without any extra help.
    >>
    >> One other thing that invalidate does is throwing away cached
    >> snapshots from the cache shared by other sessions. On the positive
    >> side it frees up some memory, on the negative - it removes items
    >> from cache that could've otherwise speed up object resolution in
    >> other sessions.
    >>
    >> I'd say keep it if your sessions share just a few objects between
    >> each other or share no objects at all; throw it away if the object
    >> sets significantly overlap between individual sessions.
    >>
    >> Andrus
    >>
    >



    This archive was generated by hypermail 2.0.0 : Mon Jun 19 2006 - 11:02:58 EDT