| Summary: | [DB] Support raw replication in HorizontalBranchingMappingStrategyWithRanges | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Cyril Jaquier <cyril.jaquier> | ||||||||||
| Component: | cdo.db | Assignee: | Eike Stepper <stepper> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||
| Severity: | enhancement | ||||||||||||
| Priority: | P3 | CC: | pascal.lehmann, stefan, stepper, szbardy | ||||||||||
| Version: | 4.1 | Flags: | stepper:
review-
|
||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | Lighter, Faster and Better | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Cyril Jaquier
Hi Stefan, this may have to be implemented by me, but I have almost no knowledge about the ranges baes mapping strategies... Committed revision 9062: - trunk/plugins/org.eclipse.emf.cdo.server.db Committed revision 9063: - trunk/plugins/org.eclipse.emf.cdo.tests Created attachment 203203 [details]
Patch v1
1) UnsupportedOperationExceptions because rawImportUnreviseNewRevisions() and rawImportReviseOldRevisions() are not properly overridden. I fixed this by changing the inheritance hierarchy from
AbstractHorizontalMappingStrategy
HorizontalAuditMappingStrategy
HorizontalAuditMappingStrategyWithRanges
HorizontalBranchingMappingStrategy
HorizontalBranchingMappingStrategyWithRanges
to
AbstractHorizontalMappingStrategy
HorizontalAuditMappingStrategy
HorizontalAuditMappingStrategyWithRanges
HorizontalBranchingMappingStrategy
HorizontalBranchingMappingStrategyWithRanges
2) The list joins for range-based list mappings are different
3) The main challenge is that the range-based list mappings change DB values (namely the CDO_VERSION_REMOVED field) in the *past*. This has no precendence in replicated scenarios and causes deep impact especially in:
a) DBUtil.deserializeTable (a new row handler for post processing is needed, additional serializeTable/deserializeTable methods are needed to keep APIs compatible) and in
b) all DBTypes (the transferred values must be returned for possible post processing, entire new methods are needed to keep APIs compatible, i.e. readValueWithResult/writeValueWithResult).
Stefan, please review. I'll try to hunt down a new regression in OfflineTest.testDisconnectAndSyncAddition(). All other tests are passing... Created attachment 203205 [details]
Patch v2 - ready to be committed
Regression fixed.
Created attachment 203208 [details]
Patch v3
Committed revision 9067: - trunk/plugins/org.eclipse.emf.cdo.server.db - trunk/plugins/org.eclipse.emf.cdo.tests - trunk/plugins/org.eclipse.emf.cdo.tests.db - trunk/plugins/org.eclipse.net4j.db - trunk/plugins/org.eclipse.net4j.tests I've committed patch v3 because I need a clean workspace and all tests are now passing. Stefan, I'm not resolving this bug until after your review ;-) After talking to Stefan it turned out that my implementation does not yet consider index positions that have been removed entirely, as opposed to those that have been just added or moved within the list. Will work on a fix tomorrow... Committed revision 9120: - trunk/plugins/org.eclipse.emf.cdo.tests Committed revision 9121: - trunk/plugins/org.eclipse.emf.cdo.tests Our original assumption that we can ignore the null-valued VERSION_REMOVED fields turned out to be wrong. Working on a fix... Created attachment 204783 [details]
Patch 2 (incremental)
The tests in WithRanges scenarios now validate the results on table level. The patch fixes the resulting 6 failures by postprocessing the VERSION_REMOVED column.
Committed revision 9464: - trunk/plugins/org.eclipse.emf.cdo.server.db - trunk/plugins/org.eclipse.emf.cdo.tests - trunk/plugins/org.eclipse.emf.cdo.tests.db Fixed Closing. |