Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036847
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServerminorhave not tried2017-09-13 13:122017-09-18 10:40
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision51bf02f1a78c
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomtaal
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036847: Check if there are local db changes before installing/updating/uninstalling SymmetricDS

DescriptionThe following tasks make model changes in the database, and update the checksum to prevent those changes from being detected in the update.database task:
- install.symmetric.ds
- uninstall.symmetric.ds
- update.symmetric.ds.configuration

Those tasks should not be executed if there are local changes in the database, because they can hide those local changes. They should check this, and only execute the task if:
- There are no local changes, or
- The -Dforce=yes parameter is set
Steps To Reproduce- Run this in a clean database:
       select ad_db_modified('N')
- It should return 'N', because at this point there should be no local db changes
- alter a column, change it from nullable to not nullable or viceversa
- Run this command again, now it should return 'Y'
       select ad_db_modified('N')
- Run ant update.database. The task should fail because it detects local changes. We want to have the same behaviour in the SymmetricDS tasks.
- Execute the uninstall.symmetric.ds in the org.openbravo.replication.symmetricds.
- Run this command again
       select ad_db_modified('N')
- Now it returns 'N', when it should have returned 'Y' because of the change in the column. The uninstall.symmetric.ds task has rewritten the checksum, so the local change is not detected now.
Proposed SolutionDo not allow to execute the install/uninstall/update SymmetricDS task if there are local changes in the database unless the force parameter is set to true
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0099011)
hgbot (developer)
2017-09-13 13:26

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 51bf02f1a78ce09707a5cf30be64985caf720013
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Sep 13 13:13:45 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/51bf02f1a78ce09707a5cf30be64985caf720013 [^]

Fixes issue 36847: SymmetricDS tasks check if there are local db changes

Now the following tasks will only be executed if there are no local changes in the database or if the -Dforce=yes option is included:
- install.symmetric.ds
- uninstall.symmetric.ds
- update.symmetric.ds.configuration

---
M build.xml
M src/org/openbravo/replication/symmetricds/task/AbstractSymmetricDsTask.java
M src/org/openbravo/replication/symmetricds/task/InstallSymmetricDsTask.java
M src/org/openbravo/replication/symmetricds/task/SymmetricDSTask_data.xsql
M src/org/openbravo/replication/symmetricds/task/UninstallSymmetricDsTask.java
M src/org/openbravo/replication/symmetricds/task/UpdateSymmetricDsTablesTask.java
---
(0099094)
mtaal (manager)
2017-09-18 10:40

Tested & reviewed

- Issue History
Date Modified Username Field Change
2017-09-13 13:12 AugustoMauch New Issue
2017-09-13 13:12 AugustoMauch Assigned To => AugustoMauch
2017-09-13 13:12 AugustoMauch Triggers an Emergency Pack => No
2017-09-13 13:24 AugustoMauch Review Assigned To => mtaal
2017-09-13 13:26 hgbot Checkin
2017-09-13 13:26 hgbot Note Added: 0099011
2017-09-13 13:26 hgbot Status new => resolved
2017-09-13 13:26 hgbot Resolution open => fixed
2017-09-13 13:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/51bf02f1a78ce09707a5cf30be64985caf720013 [^]
2017-09-18 10:40 mtaal Note Added: 0099094
2017-09-18 10:40 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker