Skip to content
This repository was archived by the owner on Mar 2, 2020. It is now read-only.

Enable master/clone mode for Specmate #250

Open
wants to merge 73 commits into
base: develop
Choose a base branch
from
Open

Enable master/clone mode for Specmate #250

wants to merge 73 commits into from

Conversation

junkerm
Copy link
Owner

@junkerm junkerm commented Aug 8, 2018

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),

junkerm and others added 7 commits September 20, 2018 11:24
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.
Copy link
Collaborator

@munterkalmsteiner munterkalmsteiner left a 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) {
Copy link
Collaborator

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")) {
Copy link
Collaborator

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"?

Copy link
Owner Author

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")) {
Copy link
Collaborator

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"?

Copy link
Owner Author

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")) {
Copy link
Collaborator

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"?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

junkerm and others added 22 commits December 1, 2018 17:07
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants