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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035495
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] StoreServermajorhave not tried2017-03-13 13:302017-03-30 17:53
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7c226695d1de
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035495: Keep track if a store server needs to sync with central before allowing connections

DescriptionThe requirement is to keep track if a store server is forced to first sync with central before it allows WebPOS systems to work with it.

The scenario is as follows:
- a new flag is added to mobile server table: sync-reload-completed
- default this flag is y
- when the store server backup is restored the system should block WebPOS systems until the reload has been done
- therefore when restoring the backup this flag should first be set to N
- it will be set to Y after the reload has happened
- while the flag is N the server should not allow WebPOS systems to work on it
Steps To ReproduceSee description
Proposed SolutionSee Description
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0095392)
hgbot (developer)
2017-03-19 10:40

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: db7935749dd52b91b565745fb79d784b124abc09
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Mar 19 10:23:05 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/db7935749dd52b91b565745fb79d784b124abc09 [^]

Related to issue 35495: Keep track if a store server needs to sync with central before allowing connections
Smaller field/column changes for new field to maintain reload status

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
---
(0095402)
hgbot (developer)
2017-03-19 10:56

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: d2a5e9cf21174fb299a378d2075938f1b85af75d
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Mar 19 10:49:10 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/d2a5e9cf21174fb299a378d2075938f1b85af75d [^]

Related to issue 35495: Keep track if a store server needs to sync with central before allowing connections
Add new column reload status to mobile server, including new list-reference and adding it to the mobile server window

---
M src-db/database/model/modifiedTables/OBMOBC_SERVER_DEFINITION.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0095403)
hgbot (developer)
2017-03-19 10:56

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: be88877e90d4db2a13e7f6c97cd3e929dfeb9836
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Mar 19 10:50:08 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/be88877e90d4db2a13e7f6c97cd3e929dfeb9836 [^]

Related to issue 35495: Keep track if a store server needs to sync with central before allowing connections
Add ant task to set the system to forcibly reload at next startup

---
M build.xml
A src/org/openbravo/replication/symmetricds/task/SetMandatoryReloadFlagTask.java
---
(0095404)
hgbot (developer)
2017-03-19 10:56

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 2d9fcf41d77acbd00d551fd957031483d120ff89
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Mar 19 10:51:58 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/2d9fcf41d77acbd00d551fd957031483d120ff89 [^]

Fixes issue 35495: Keep track if a store server needs to sync with central before allowing connections
Added new thread-class to continue reload actions. Some reformatting. Removed system.exit as the acccess from WebPOS is anyway prevented.
Do less attempts to reload in case of non-mandatory reload

---
M src/org/openbravo/replication/symmetricds/SetupSymmetricListener.java
---
(0095465)
AugustoMauch (developer)
2017-03-21 12:25
edited on: 2017-03-21 12:25

In SetMandatoryReloadFlagTask, I think it is better to do the update using the mobile.server.key specified in the Openbravo.properties rather than using the iscurrent flag.

The iscurrent flag is programatically set in a context listener, users do not set it manually.

(0095466)
AugustoMauch (developer)
2017-03-21 12:27

I am not sure about setting the reload status to OK after five minutes if the reload was not mandatory [1]. Why not waiting until it is finished?

[1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/2d9fcf41d77acbd00d551fd957031483d120ff89#l1.296 [^]
(0095629)
hgbot (developer)
2017-03-29 09:53

Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ec32db46bde931331f2c1a3a22a4968a8997c2dd
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Mar 29 09:52:33 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ec32db46bde931331f2c1a3a22a4968a8997c2dd [^]

Fixes issue 35618, related to issue 35495: Keep track if a store server needs to sync with central before allowing connections

Add return to prevent double execution of super.service
Move the allow request handler to the getpost method so that the super class can correctly handle generic logic such as
cors requests

---
M src/org/openbravo/mobile/core/process/MobileService.java
---
(0095631)
mtaal (manager)
2017-03-29 09:57

To react on reviewers comment:
the idea to set reload status to OK after five minutes is that the reload is not mandatory, so the system should really start at some point. Otherwise restarting in offline mode is not possible.
(0095667)
AugustoMauch (developer)
2017-03-29 17:38

Code reviewed and verified
(0095668)
hgbot (developer)
2017-03-29 17:49

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 092421a978fef3535c0d69f6cac8a0baf82e1a27
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Mar 29 17:48:58 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/092421a978fef3535c0d69f6cac8a0baf82e1a27 [^]

Fixes issue 35495: Keep track if a store server needs to sync with central before allowing connections
Use the mobile server key to find the record to update

---
M src/org/openbravo/replication/symmetricds/task/SetMandatoryReloadFlagTask.java
---
(0095710)
AugustoMauch (developer)
2017-03-30 14:05

Two comments:
- If the set.mandatory.reload.flag.current.server is executed in a central server, it should not modify the flag, because the flag is only managed in Java for the store servers.
- It would be better if the update is done using xsql instead of DAL. That way we can avoid initializing dal just for one simple update.
(0095725)
mtaal (manager)
2017-03-30 16:37

Reaction: first change will be done. Second change will not, although comment is correct that DAL is heavy to initialize it is a task which is seldom done. So this means changing to xsql adds less value for now.
(0095726)
hgbot (developer)
2017-03-30 16:38

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 7c226695d1ded9058045954779858d2f918a15f4
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Mar 30 16:38:04 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7c226695d1ded9058045954779858d2f918a15f4 [^]

Fixes issue 35495: Keep track if a store server needs to sync with central before allowing connections
Throw exception if run on the central server

---
M src/org/openbravo/replication/symmetricds/task/SetMandatoryReloadFlagTask.java
---
(0095732)
AugustoMauch (developer)
2017-03-30 17:53

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2017-03-13 13:30 mtaal New Issue
2017-03-13 13:30 mtaal Assigned To => mtaal
2017-03-13 13:30 mtaal Triggers an Emergency Pack => No
2017-03-19 10:40 hgbot Checkin
2017-03-19 10:40 hgbot Note Added: 0095392
2017-03-19 10:56 hgbot Checkin
2017-03-19 10:56 hgbot Note Added: 0095402
2017-03-19 10:56 hgbot Checkin
2017-03-19 10:56 hgbot Note Added: 0095403
2017-03-19 10:56 hgbot Checkin
2017-03-19 10:56 hgbot Note Added: 0095404
2017-03-19 10:56 hgbot Status new => resolved
2017-03-19 10:56 hgbot Resolution open => fixed
2017-03-19 10:56 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/2d9fcf41d77acbd00d551fd957031483d120ff89 [^]
2017-03-20 10:49 mtaal Review Assigned To => AugustoMauch
2017-03-21 12:25 AugustoMauch Note Added: 0095465
2017-03-21 12:25 AugustoMauch Status resolved => new
2017-03-21 12:25 AugustoMauch Resolution fixed => open
2017-03-21 12:25 AugustoMauch Note Edited: 0095465 View Revisions
2017-03-21 12:27 AugustoMauch Note Added: 0095466
2017-03-29 09:53 hgbot Checkin
2017-03-29 09:53 hgbot Note Added: 0095629
2017-03-29 09:57 mtaal Note Added: 0095631
2017-03-29 16:56 AugustoMauch Status new => scheduled
2017-03-29 17:38 AugustoMauch Status scheduled => resolved
2017-03-29 17:38 AugustoMauch Resolution open => fixed
2017-03-29 17:38 AugustoMauch Note Added: 0095667
2017-03-29 17:38 AugustoMauch Status resolved => closed
2017-03-29 17:49 hgbot Checkin
2017-03-29 17:49 hgbot Note Added: 0095668
2017-03-29 17:49 hgbot Status closed => resolved
2017-03-29 17:49 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/2d9fcf41d77acbd00d551fd957031483d120ff89 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/092421a978fef3535c0d69f6cac8a0baf82e1a27 [^]
2017-03-30 14:05 AugustoMauch Note Added: 0095710
2017-03-30 14:05 AugustoMauch Status resolved => new
2017-03-30 14:05 AugustoMauch Resolution fixed => open
2017-03-30 16:37 mtaal Note Added: 0095725
2017-03-30 16:38 hgbot Checkin
2017-03-30 16:38 hgbot Note Added: 0095726
2017-03-30 16:38 hgbot Status new => resolved
2017-03-30 16:38 hgbot Resolution open => fixed
2017-03-30 16:38 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/092421a978fef3535c0d69f6cac8a0baf82e1a27 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7c226695d1ded9058045954779858d2f918a15f4 [^]
2017-03-30 17:53 AugustoMauch Note Added: 0095732
2017-03-30 17:53 AugustoMauch Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker