Bug 247865 - Manage CDOResource's time stamp
Summary: Manage CDOResource's time stamp
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows Vista
: P4 enhancement with 1 vote (vote)
Target Milestone: Past   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Appealing to a Broader Community
Keywords: helpwanted
Depends on: 249847
Blocks:
  Show dependency tree
 
Reported: 2008-09-18 14:20 EDT by Adolfo Sanchez-Barbudo Herrera CLA
Modified: 2020-12-11 10:45 EST (History)
3 users (show)

See Also:
stepper: galileo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Sanchez-Barbudo Herrera CLA 2008-09-18 14:20:03 EDT
When CDOResource from a view/transaction is loaded or saved (only transactions), the time stamp must be set.
Comment 1 Eike Stepper CLA 2008-09-23 14:27:55 EDT
See also: bug #248296: Manage the "isLoaded" property of CDOResource
Comment 2 Simon Mc Duff CLA 2008-10-07 21:12:46 EDT
We should reset the timestamp when
- load/loadTransition = current.
- invalidate = URIConverter.NULL_TIME_STAMP
- save/commit = current.

Others suggestions ?
Comment 3 Eike Stepper CLA 2008-10-08 04:40:04 EDT
(In reply to comment #2)

First I thought the timestamp should reflect the time of last modification (which might also be interesting), but the JavaDoc is clear:

Returns the cached value of the time stamp when this resource was last loaded or saved, or NULL_TIME_STAMP if the resource is not loaded and the time stamp has not been set. The return value is represented as the number of milliseconds since the epoch (00:00:00 GMT, January 1, 1970). The returned value may not be the same as the actual time stamp if the resource has been modified via external means since the last load or save.

---


> We should reset the timestamp when
> - load/loadTransition = current.

Yes.

> - invalidate = URIConverter.NULL_TIME_STAMP

Should we use isLoaded()?

> - save/commit = current.

Yes.

More questions:

- Should the time be local time or repository time?
- Should the timestamp be updated on load of any contained object or only the resource object itself?
Comment 4 Eike Stepper CLA 2008-10-09 01:51:10 EDT
Adolfo, there are some semantic gaps between loading a file based resource and loading a CDOResource. The latter happens asynchronously and partially. This seems to require a re-interpretation of the original semantics of the time stamp. Could you please describe exactly what you need this value for, so that we can consider it?
Comment 5 Adolfo Sanchez-Barbudo Herrera CLA 2008-10-16 07:32:25 EDT
(In reply to comment #4)
> Adolfo, there are some semantic gaps between loading a file based resource and
> loading a CDOResource. The latter happens asynchronously and partially. This
> seems to require a re-interpretation of the original semantics of the time
> stamp. Could you please describe exactly what you need this value for, so that
> we can consider it?
> 


Hi Eikke, sorry for the delay...

Well, my idea about taking advantage from time stamp was to know if an on-memory Resource is synchronized with its persistent state....

I'm not sure if this makes sense in CDO, since AFAIK a CDOResource should be always synchronized, I mean...If I'm working with a CDOResource and somebody changes the resource in the underlying DB, my on-memory CDOResource will be automatically updated (if the elements changed in the DB were previously loaded in the CDOResource)

I would like to know if my Resource is synchronyzed independently it's a CDOResource or "normal" Resource, in this case using the time-stamp. However I understand that the time stamp for a CDOResource is much more difficult to manage.

I haven't thought about other advantages regarding the usage of the time stamp, or if it's worth trying to implement a mechanism for CDOResources,... For me, It would avoid me to distingish between a Resource and CDOResource to know if a Resource is synchronized...

I hope the info helps...

Cheers,
Adolfo.
Comment 6 Simon Mc Duff CLA 2008-12-02 15:59:56 EST
Is this feature still needed ?

Is it for GMF ? Or something else ?

Comment 7 Adolfo Sanchez-Barbudo Herrera CLA 2008-12-03 06:31:07 EST
(In reply to comment #6)
> Is this feature still needed ?
> 
> Is it for GMF ? Or something else ?
> 

Any effort to allow a CDO Resource to be treated as it were a Resource, it is worth for the project. The time stamp is a feature of a Resource, therefore, it would be interesting for clients if they had the possiblity of using it when dealing with a CDO Resource.

I remember talking with Victor about different ways to tackle the problem, like having a timestamp per object in the database, or modifying the timestamp of every resource of every view when a object is modified in the data base...

I'll talk to Victor so he can make a deep insight on a possible solution.

Cheers.
Comment 8 Eike Stepper CLA 2009-11-01 05:58:10 EST
Rebasing all unresolved enhancement requests to 3.0
Comment 9 Eike Stepper CLA 2010-06-29 04:49:58 EDT
Rebasing all outstanding enhancements requests to version 4.0
Comment 10 Eike Stepper CLA 2011-06-23 03:56:47 EDT
Moving all open enhancement requests to 4.1
Comment 11 Eike Stepper CLA 2012-08-14 22:50:21 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 12 Eike Stepper CLA 2013-06-27 04:05:36 EDT
Moving all outstanding enhancements to 4.3
Comment 13 Eike Stepper CLA 2014-08-19 09:22:27 EDT
Moving all open enhancement requests to 4.4
Comment 14 Eike Stepper CLA 2014-08-19 09:34:43 EDT
Moving all open enhancement requests to 4.4
Comment 15 Eike Stepper CLA 2015-07-14 02:07:26 EDT
Moving all open bugzillas to 4.5.
Comment 16 Eike Stepper CLA 2016-07-31 00:50:20 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 17 Eike Stepper CLA 2017-12-28 01:11:04 EST
Moving all open bugs to 4.7
Comment 18 Eike Stepper CLA 2019-11-08 02:06:40 EST
Moving all unresolved issues to version 4.8-
Comment 19 Eike Stepper CLA 2019-12-13 12:47:05 EST
Moving all unresolved issues to version 4.9
Comment 20 Eike Stepper CLA 2020-12-11 10:45:14 EST
Moving to 4.13.