Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335679 - Centric integrity checking on client side
Summary: Centric integrity checking on client side
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 07:17 EST by Egidijus Vaisnora CLA
Modified: 2020-12-11 10:41 EST (History)
0 users

See Also:


Attachments
patch v1 (20.98 KB, patch)
2011-02-25 09:05 EST, Egidijus Vaisnora CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Egidijus Vaisnora CLA 2011-01-28 07:17:14 EST
Intention is to make centric integrity checking on client side on every single commit.
Client must be able to switch off integrity checking on client on his own risk.
Comment 1 Caspar D. CLA 2011-01-31 02:58:07 EST
### Eclipse Workspace Patch 1.0
#P org.eclipse.emf.cdo
Index: src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
===================================================================
--- src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java	(revision 6984)
+++ src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java	(working copy)
@@ -2315,12 +2315,7 @@
 
         try
         {
-          // TODO (CD) It might be better to always do the checks,
-          // instead of only for partial commits
-          if (isPartialCommit)
-          {
-            new CommitIntegrityCheck(this, CommitIntegrityCheck.Style.EXCEPTION_FAST).check();
-          }
+          new CommitIntegrityCheck(this, CommitIntegrityCheck.Style.EXCEPTION_FAST).check();
 
           preCommit(getNewObjects(), lobs);
           preCommit(getDirtyObjects(), lobs);
Comment 2 Caspar D. CLA 2011-01-31 03:03:49 EST
Btw, client-side disabling of the checks makes no sense.
The server-side protection (the one that Eike will extend
to cover bidi refs) would reject the commit anyway.
Comment 3 Egidijus Vaisnora CLA 2011-01-31 07:05:54 EST
Server side checking is configurable by property "ensureReferentialIntegrity" on repository configuration, which seems to be false by default. I think the same property could be added to session options for client side and make it by default true
Comment 4 Egidijus Vaisnora CLA 2011-02-14 06:31:23 EST
After I had enabled integrity check, more errors like NPE appeared. 
For example TransactionTest.testPushModeNewObjects gets CDOResource from dirty object set, regardless that it has CLEAN state. How could it happen? Later this resource is used for obtaining clean revision from the transaction map, which doens't hold clean revision for it.
Comment 5 Egidijus Vaisnora CLA 2011-02-25 09:05:14 EST
Created attachment 189798 [details]
patch v1

Included Caspar patch. Additionally added to transaction option to turn on/off integrity check "isCommitIntegrityCheckEnabled". Moved CommitIntegrityCheck to SPI - I think it will be useful to use this code for client to collect and adjust missing objects before commit.
I have made "isCommitIntegrityCheckEnabled" option return false by default, because that all tests are not passing if it is by default set to true. Problems are reported in 337523 and 337587)
Comment 6 Eike Stepper CLA 2011-06-23 04:30:35 EDT
Moving all open enhancement requests to 4.1
Comment 7 Eike Stepper CLA 2012-08-14 22:54:15 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 8 Eike Stepper CLA 2013-06-27 04:09:28 EDT
Moving all outstanding enhancements to 4.3
Comment 9 Eike Stepper CLA 2014-08-19 09:29:28 EDT
Moving all open enhancement requests to 4.4
Comment 10 Eike Stepper CLA 2014-08-19 09:38:12 EDT
Moving all open enhancement requests to 4.4
Comment 11 Eike Stepper CLA 2015-07-14 02:16:35 EDT
Moving all open bugzillas to 4.5.
Comment 12 Eike Stepper CLA 2016-07-31 00:59:32 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 13 Eike Stepper CLA 2017-12-28 01:17:08 EST
Moving all open bugs to 4.7
Comment 14 Eike Stepper CLA 2019-11-08 02:14:10 EST
Moving all unresolved issues to version 4.8-
Comment 15 Eike Stepper CLA 2019-12-13 12:47:50 EST
Moving all unresolved issues to version 4.9
Comment 16 Eike Stepper CLA 2020-12-11 10:41:36 EST
Moving to 4.13.