-
Notifications
You must be signed in to change notification settings - Fork 34
Enable master/clone mode for Specmate #250
base: develop
Are you sure you want to change the base?
Conversation
Conflicts: bundles/cnf/localrepo/index.xml bundles/cnf/localrepo/index.xml.sha bundles/cnf/releaserepo/index.xml bundles/cnf/releaserepo/index.xml.sha
So that these services can be started up again by the following test
into cdo-master-cl Conflicts: bundles/cnf/localrepo/index.xml bundles/cnf/localrepo/index.xml.sha bundles/cnf/releaserepo/index.xml bundles/cnf/releaserepo/index.xml.sha
Conflicts: bundles/cnf/localrepo/index.xml bundles/cnf/localrepo/index.xml.sha bundles/cnf/releaserepo/index.xml bundles/cnf/releaserepo/index.xml.sha bundles/specmate-connectors/src/com/specmate/connectors/internal/ConnectorService.java bundles/specmate-dbprovider-api/src/com/specmate/dbprovider/api/migration/SQLMapper.java bundles/specmate-dbprovider-h2/src/specmate/dbprovider/h2/AttributeToSQLMapper.java bundles/specmate-integration-test/bnd.bnd bundles/specmate-integration-test/src/com/specmate/test/integration/IntegrationTestBase.java bundles/specmate-migration-test/src/com/specmate/migration/test/AddAttributeTest.java bundles/specmate-migration-test/src/com/specmate/migration/test/AddObjectTest.java bundles/specmate-migration-test/src/com/specmate/migration/test/AddSeveralAttributesTest.java bundles/specmate-migration-test/src/com/specmate/migration/test/ChangedTypesTest.java bundles/specmate-migration-test/src/com/specmate/migration/test/MigrationTestBase.java bundles/specmate-migration-test/src/com/specmate/migration/test/RenamedAttributeTest.java bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyService.java bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java bundles/specmate-std-env/dev-specmate-all-oracle.bndrun bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun
These are analogous to the H2 implementation, but unverified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I fixed the failing tests and updated the oracle migrators.
repository.setInitialPackages(packages.toArray(new EPackage[0])); | ||
} | ||
|
||
if (isClone) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge with previous conditional statement (line 241)
updateOpenViews(); | ||
openEventView(); | ||
this.active = true; | ||
} | ||
|
||
private void mergeIfNecessary() { | ||
if (currentOfflineBranch != null && currentOfflineBranch.getName().contains("Offline")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constant for literal "Offline"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
currentOfflineBranch = null; | ||
return; | ||
} | ||
if (branch.getName().contains("Offline")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constant for literal "Offline"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if (branch.getName().equals(currentOfflineBranchName)) { | ||
return; | ||
} | ||
if (branch.getName().equals("MAIN")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constant for literal "Main"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
...do.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/AbstractMappingStrategy.java
Show resolved
Hide resolved
into cdo-master-cl Conflicts: bundles/cnf/localrepo/index.xml bundles/cnf/localrepo/index.xml.sha bundles/cnf/releaserepo/index.xml bundles/cnf/releaserepo/index.xml.sha
Conflicts: bundles/cnf/releaserepo/index.xml bundles/cnf/releaserepo/index.xml.sha bundles/specmate-auth-test/bnd.bnd bundles/specmate-cdo-server/bnd.bnd bundles/specmate-cdo-server/src/com/specmate/cdoserver/internal/SpecmateCDOServer.java bundles/specmate-config/config/specmate-config.properties bundles/specmate-connectors/src/com/specmate/connectors/internal/ConnectorService.java bundles/specmate-dbprovider-h2/src/specmate/dbprovider/h2/AttributeToSQLMapper.java bundles/specmate-dbprovider-h2/src/specmate/dbprovider/h2/H2Provider.java bundles/specmate-dbprovider-oracle/bnd.bnd bundles/specmate-dbprovider-oracle/src/specmate/dbprovider/oracle/AttributeToSQLMapper.java bundles/specmate-emfrest/src/com/specmate/emfrest/internal/rest/SpecmateResource.java bundles/specmate-integration-test/bnd.bnd bundles/specmate-migration-test/bnd.bnd bundles/specmate-migration/src/com/specmate/migration/internal/services/MigratorService.java bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyService.java bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/CDOPersistencyServiceConfig.java bundles/specmate-persistency-cdo/src/com/specmate/persistency/cdo/internal/TransactionImpl.java bundles/specmate-std-env/dev-specmate-all-oracle.bndrun bundles/specmate-std-env/dev-specmate-all.bndrun bundles/specmate-std-env/prod-specmate-all.bndrun bundles/specmate-std-env/prod-specmate-cdo-server-oracle.bndrun bundles/specmate-std-env/prod-specmate-cdo-server.bndrun bundles/specmate-std-env/prod-specmate-no-cdo-server.bndrun
into cdo-master-cl
With this pull request, Specmate can be configured as a clone of another specmate instance. Both master and clone will have synchronous data stores.
When the master goes offline, the clone continuous to accept and process requests, as soon as the master goes online both will be synched. The same holds if the clones goes down.
Example configurations are in the config bundle.
As there were bugs in CDO for the case of Master/Clone mode and oracle, we incorporate four cdo bundles as source in the repoistory for now. WE can remove those as soon as the bugs are fixed. We migrated also to CDO 4.6 (from CDO 4.5),