| Summary: | FailOverParticipant: Type change from MASTER to BACKUP does not work | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Erwin Betschart <erwin> | ||||
| Component: | cdo.core | Assignee: | Martin Fluegge <martin.fluegge> | ||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 3.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | offline-04 | ||||||
| Attachments: |
|
||||||
|
Description
Erwin Betschart
The problem is that while a FailoverParticipant is in state MASTER the following two replication "counters" are not maintained (increased): - SynchronizableRepository.lastReplicatedBranchID - SynchronizableRepository.lastReplicatedCommitTime When the MASTER is then switched to BACKUP the initial syncing phase of the new BACKUP asks for data from the new MASTER that is already in the new BACKUP. Writing this duplicate data leads to exceptions. Fix in FailoverParticipant.changingType(Type, Type):
if (newType == MASTER)
{
// Switch off synchronizer
doStopSynchronization();
}
else
{
// Bug 312879
setLastReplicatedBranchID(getStore().getLastBranchID());
setLastReplicatedCommitTime(getLastCommitTimeStamp());
// Switch on synchronizer
doStartSynchronization();
}
Committed to HEAD Created attachment 171796 [details]
Test v1
I additionally attached a patch that verfies the fix.
Committed to HEAD.
Available in 3.0 GA: http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/ |