Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035000 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Retail Modules] StoreServer | major | have not tried | 2017-01-18 15:46 | 2017-10-01 22:33 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | f7de544e2d23 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | mtaal | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035000: Support refresh of the MobileServerProvider cache in a clustered environment | |||||||
Description | Currently the MobileServerProvider [1] cache is refreshed by using event handlers which reset the cache when a MobileServerDefinition/Organization is changed [2] and [3]. This does not work in a clustered environment as each cluster node will separately cache the data and the cache is only refreshed in one of the nodes (the one in which it is updated). As mobile server definitions/organizations do not change often this topic is not a big issue. It should still be solved at some point. [1] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java [^] [2] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/eventhandler/MobileServerOrganizationEventHandler.java#l62 [^] [3] https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/eventhandler/MobileServerEventHandler.java#l73 [^] | |||||||
Steps To Reproduce | Check the code | |||||||
Proposed Solution | Provide some form of automatic cache expiry. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0099638) hgbot (developer) 2017-09-27 18:39 |
Repository: erp/pmods/org.openbravo.replication.symmetricds Changeset: f7de544e2d235dc2fffbcea961dcf6d1bfa43a28 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Wed Sep 27 18:20:32 2017 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/f7de544e2d235dc2fffbcea961dcf6d1bfa43a28 [^] Fixes issue 35000: Makes sure cache is updated before routing data If a central server was deployed in a cluster, there was a risk of the MobileServerProvider caches getting out of date, and as a result of that some stores could miss data because the router used the outdated cache. It could happen if: - A new mobile server is added and registered using the central server instance#1 - The MobileServerProvider caches of instance#1 are updated by an event handler - instance#2 does not notice the change, is not aware of the new store - instance#2 routes data that should have been routed to the new store, but does not do it because it is not aware of the new store being registered To fix this, AbstractClientFilteredRouter and AbstractOrganizationBasedRouter, parent classes of all routers, check if the cache of their MobileServerProvider is updated by checking if they contain all the nodes that symmetricds provided them (SymmetricDS always provides all the nodes, as it does not use a cache but it queries the database). If the cache is missing any node, the instance of MobileServerProvider will be reset so that the next time it is requested it will be recreated with the latest information. There is no performance problem in adding this check, even though it is done per record routed. I run the check 1000 times simulating that there were 500 stores and the aggregated time was ~30ms. --- M src/org/openbravo/replication/symmetricds/extensions/AbstractClientFilteredRouter.java M src/org/openbravo/replication/symmetricds/extensions/AbstractOrganizationBasedRouter.java M src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java --- |
(0099687) mtaal (manager) 2017-10-01 22:33 |
reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2017-01-18 15:46 | mtaal | New Issue | |
2017-01-18 15:46 | mtaal | Assigned To | => AugustoMauch |
2017-01-18 15:46 | mtaal | Triggers an Emergency Pack | => No |
2017-03-29 13:45 | AugustoMauch | Target Version | RR17Q2 => RR17Q3 |
2017-06-26 18:13 | AugustoMauch | Target Version | RR17Q3 => |
2017-09-27 18:38 | AugustoMauch | Review Assigned To | => mtaal |
2017-09-27 18:39 | hgbot | Checkin | |
2017-09-27 18:39 | hgbot | Note Added: 0099638 | |
2017-09-27 18:39 | hgbot | Status | new => resolved |
2017-09-27 18:39 | hgbot | Resolution | open => fixed |
2017-09-27 18:39 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/f7de544e2d235dc2fffbcea961dcf6d1bfa43a28 [^] |
2017-10-01 22:33 | mtaal | Note Added: 0099687 | |
2017-10-01 22:33 | mtaal | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |