Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315240

Summary: Clone repository and master repository do not have equal timestamps for the same revisions.
Product: [Modeling] EMF Reporter: Erwin Betschart <erwin>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: cyril.jaquier, stepper
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Erwin Betschart CLA 2010-06-01 11:32:39 EDT
Build Identifier: 3.0

The master and clone repository have different revised and created timestamps. This can lead to problems as:

- Replication might not works as revisions are not replicated due to different timestamps. 
- Revisions are replicated twice.

Data taken from the DBBrowser
CLIENT:


CDOID                           cdo_created     cdo_revised
2338 	1 	0 	1303 	1274425601950 	1275403846973 	0 
2338 	2 	0 	1303 	1275403846974 	1275403929651 	0

SERVER:



2338 	1 	0 	1303 	1274425601950 	1275403846968 	0
2338 	2 	0 	1303 	1275403846969 	1275403929647 	0

Reproducible: Always

Steps to Reproduce:
1. Commit a change to the clone repo (is written via write through to the master)
2. A CommitRunable which writes the commit to the clone 
3. The master and clone repository have different revised / created timestamps
Comment 1 Erwin Betschart CLA 2010-06-02 03:12:02 EDT
Forgot to mention that the raw replication was used.
Comment 2 Eike Stepper CLA 2010-06-04 07:50:26 EDT
WriteThroughCommitContext was calling a wring getTimeStamp() method in OfflineClone. Better:

    @Override
    protected long createTimeStamp(OMMonitor monitor)
    {
      // Already set after commit to the master
      return WriteThroughCommitContext.this.getTimeStamp(); // Do not call getTimeStamp() of the enclosing Repo class!!!
    }
Comment 3 Eike Stepper CLA 2010-06-04 07:51:02 EDT
Committed to HEAD
Comment 4 Eike Stepper CLA 2010-06-29 04:36:26 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/