| Summary: | Double refresh breaks model consistency | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Egidijus Vaisnora <vaisegid> | ||||||
| Component: | cdo.core | Assignee: | Egidijus Vaisnora <vaisegid> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | saulius.tvarijonas | ||||||
| Version: | 4.1 | Flags: | stepper:
review+
|
||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Egidijus Vaisnora
Created attachment 205834 [details]
Testcase
Created attachment 205877 [details]
Patch v1
For this issue are collaborating two problems: - in cache is left stale revision. When new revision is send from server on refresh, the old revision in local cache is revised, but only if old revision has version less by one value comparing to the received new one. Else old revision is not revised and lives in the cache. - revision is removed from the local cache if it is not revised and is not "viewed" by any of sessions view before each session refresh. I do not recall why it was needed, but I remember it was one of the bugfix. Side effect of this removal is that if object is in PROXY state, it is decided to be not "viewed" and then its revision is removed from local cache. If object transit to CLEAN state before update, revision would stay in the cache. Patch fixes first issue, which looks for me more important, because it opens gate for model inconsistency. Patch ensures, if in local cache is attempting to add revision with "revised == 0" and if it has already revision "revised == 0" in the cache, and there are no local information to correctly set revised data, then old revision is removed from cache. I've slightly refactored the revision manager changes. You tend to forget that tests must be included in AllConfigs.java. Without that you can not execute the AllTests suite which is required to prevent regressions. In this case your test fails in all legacy scenarios. Please investigate. I've committed the review result to branch bugs/361819: commit 349f8f60e5a248bfc486ac05c76d407bfb7aedb2 Author: Eike Stepper <stepper@esc-net.de> 2011-11-12 09:02:26 Committer: Eike Stepper <stepper@esc-net.de> 2011-11-12 09:02:26 Parent: 1f620cfdc202d0f8334fff39be7f8279e263d30f ([363287] CDODeltaNotification.getOldValue() returns a CDOIDObjectLongImpl on remotely detached CDOObject https://bugs.eclipse.org/bugs/show_bug.cgi?id=363287) Branches: bugs/361819 [361819] Double refresh breaks model consistency https://bugs.eclipse.org/bugs/show_bug.cgi?id=361819 Can not push the branch with EGit, waiting for Stefan to help... Okay, my push spec was wrong. Now I pushed the mentioned branch. Hi Egidijus, still interested in this? Please take a look at the mentioned branch... Fixed precondition checking for PROXY state existence in legacy mode. Seems that legacy is resolving PROXY earlier commit 37b31a837b4c76bbdae1951788810bcc5bc7cda1 (patch) (side-by-side diff) tree ecb80baf94fe6178c44f6bbec3fd1798c070a492 parent 349f8f60e5a248bfc486ac05c76d407bfb7aedb2 (diff) I understand now. I added that check back and excluded the test case from legacy scenraios: @Skips(IModelConfig.CAPABILITY_LEGACY) commit 77284104fe836990c76ee674c5cda6c9fcd1a664 Author: Eike Stepper <stepper@esc-net.de> 2011-12-08 16:46:35 Committer: Eike Stepper <stepper@esc-net.de> 2011-12-08 16:46:35 Parent: 37b31a837b4c76bbdae1951788810bcc5bc7cda1 (Disabling PROXY state checking as condition. Legacy mode seems to resolve PROXY earlier) [361819] Double refresh breaks model consistency https://bugs.eclipse.org/bugs/show_bug.cgi?id=361819 Something went wrong with Git, trying again: commit b9f55459d56685d2f19acf498a1eb634a3e0ad0b commit 084f1896ecec875265340e524ae837337ecf3ce2 Author: Eike Stepper <stepper@esc-net.de> 2011-12-08 17:53:20 Committer: Eike Stepper <stepper@esc-net.de> 2011-12-08 17:53:20 Parent: 0cf119f43e3bd6fa13f028ea32b88a67fac3e691 ([365832] Issues when trying to import changes: Cannot modify a frozen exception issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=365832) Parent: b9f55459d56685d2f19acf498a1eb634a3e0ad0b ([361819] Double refresh breaks model consistency https://bugs.eclipse.org/bugs/show_bug.cgi?id=361819) Branches: origin/master, master Merge branch 'bugs/361819' Backport to 4.0 via bug 366066. Closing. |