Community
Participate
Working Groups
Using PU=false or PU=true with puMode=CHANGES/ADDITIONS, the result of a refresh or commitNotification, is that both a new revision is added to the revisionCache, and the revision currently backing the object (i.e. the one returned by obj.cdoRevision()) is updated. The object's data state thus ends up being represented twice in the client's memory. While I haven't noticed any obvious breakage as a consequence of this, it doesn't seem right to me.
Note that I'm talking about a clean object here. In general, I think it should hold for clean objects that if obj.cdoRevision() returns rev, then rev == revMgr.getRevisionByVersion(rev.getID(), rev, 0, false); If this doesn't hold (as my forthcoming testcase will demonstrate), then the rev in the revMgr is a waste of memory.
Created attachment 190248 [details] Testcase (as a patch)
I wonder if this can even be harmful when the only immutability of a revision kicks in: setRevised(long)
Created attachment 190726 [details] Patch v1 IMO the state machine needs to get out of the delta-application business. This patch arranges that.
Committed revision 7428.
Available in R20110608-1407