Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315240 - Clone repository and master repository do not have equal timestamps for the same revisions.
Summary: Clone repository and master repository do not have equal timestamps for the s...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 11:32 EDT by Erwin Betschart CLA
Modified: 2010-06-29 09:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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/