Hi Max
I have spent a bit of time on this and I have a question.
I will step through the code. I am debugging an update operation
Ln 788 ShardedSessionImpl.applySaveOrUpdateOperation()
If I understand what is going on here, for the purposes of
optimization you are looking in the session for the object (Which in
theory should be cached in the session associated with the shard it is
located on). So from Ln 788, the execution jumps to ln 1531
getShardIdForObject and this is where the problem is originating.
In my case my "obj" resides on shard id 2 (I have assigned the shards
ids, 0,1,2,3, so 4 in total), but it appears that the only shard that
has a session associated with it is first shard in the list.
Consequently in getShardForObject(ln 1485), since the session is null
in the shardsToConsider list it will not try to find the object on the
shard it exists on.
Once it cannot resolve the shard it uses the resolution strategy and
then the merge and save logic if the shard has not been resolved.
So, it appears the reason that it is not looking in the session for
the object is because in the context of an update action the session/s
are not associated with the shards in the ShardedSessionImpl, so
during the iteration it is not considered
My next questions to resolve my issue would be;
Under these circumstances, would I expect every Shard to have a
session associated with it, or should I expect only the shard that
contains the object to have a session associated with it? I would
imagine all 4 shards shoudl have associated sessions?
If I can clear that up, I can further my investigation in the
knowledge that it is my implementation and not an issue with the
framework.
Thanks
> > > - Show quoted text -- Hide quoted text -