Andrus Adamchik <andru..bjectstyle.org> wrote:
> Mike,
> 
> I think you are right in describing this problem. Invalidation 
> shouldn't kick out objects out of peer ObjectStores (esp. since it 
> preserves them in the originating ObjectStore).
> 
> A note on the patch - I don't quiet understand the merge part in 
> ObjectStore.processInvalidatedIDs. It doesn't seem to accomplish 
> anything, as this line:
> 
> DataRow diff = getSnapshot(oid, context);
> 
> returns a locally cached snapshot from retainedSnapshotMap. Maybe we 
> just leave modified and deleted objects unchanged in the peer 
> ObjectStores?
I think leaving the deleted objects unchanged makes sense.
However, I think that a modified object has to have its backing store 
updated.
Otherwise, optimistic locking will fail.
Also if the modification is rolled back, the object will be out of sync, 
won't it?
I mostly copied the merge code from the processUpdatedSnapshots method.
My understanding was that 
> DataRow diff = getSnapshot(oid, context);
would refetch the data from the database since the snapshot has no cache at 
this point.
At least, I think that's the case, because it looked to me that the 
DataRowStore would have already cleared the cache in 
DataRowStore.processInvalidatedIDs().
I have to admit that I'm almost out of my depth on this patch, so maybe I'm 
wrong.
-Mike
This archive was generated by hypermail 2.0.0 : Sat Jan 08 2005 - 18:30:00 EST