Re: invalidation -> transient patch comments?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sat Jan 08 2005 - 22:15:55 EST

  • Next message: Mike Kienenberger: "Re: invalidation -> transient patch comments?"

    > So would that simply be calling the following directly?
    >
    > getDataRowCache().getSnapshot(oid, context);

    Yeah, this should work.

    There is a small side effect - fetched snapshot will end up being
    stored in the DataRowStore after this call... As we are invalidating
    it, it will be removed almost immediately after that. Probably not a
    big deal at all, but it looks like a fetch bypassing DataRowStore is
    cleaner.

    Andrus

    On Jan 8, 2005, at 9:39 PM, Mike Kienenberger wrote:

    > Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> Here is the method in question:
    >>
    >> public synchronized DataRow getSnapshot(ObjectId oid, QueryEngine
    >> engine) {
    >> DataRow retained = getRetainedSnapshot(oid);
    >> return (retained != null) ? retained :
    >> getDataRowCache().getSnapshot(oid, engine);
    >> }
    >>
    >> The first line ("getRetainedSnapshot") will cause problems - it
    >> accesses a special local cache for modified objects. "Retained"
    >> snapshot is taken when an object is first modified and is stored
    >> locally in the ObjectStore... So this is not the fresh "diff" but
    >> rather a potentially stale old snapshot.
    >>
    >> So looks like a manual snapshot DataRow fetch is needed to obtain a
    >> valid "diff".
    >
    > So would that simply be calling the following directly?
    >
    > getDataRowCache().getSnapshot(oid, context);
    >



    This archive was generated by hypermail 2.0.0 : Sat Jan 08 2005 - 22:16:04 EST