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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034999
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Retail Modules] StoreServermajorhave not tried2017-01-18 15:432017-01-30 09:20
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf9af11aa6a4c
ProjectionnoneETAnoneTarget VersionRR17Q2
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

0034999: Do more caching and re-organize code in MobileServerProvider in the Replication Module

DescriptionThe MobileServerProvider class [1] provides the mobile servers and node-ids by client and organization to the symmetric ds routers.

This class can be improved in several ways:
- the synchronized block is not completely correct as the global member is set in the beginning of the initialization method [2], thereby defeating the check done in other code to determine if initialization needs to happen [3].
- node ids by client and organization can also be cached [4] and [5]

The code can be re-organized also to not call the original getters from the initialization code.

[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/util/MobileServerProvider.java#l101 [^]

[3]
https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java#l81 [^]

[4]
https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java#l93 [^]

[5]
https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/file/963ec1086228/src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java#l177 [^]

Steps To ReproduceSee the current implementation of the MobileServerProvider
Proposed SolutionSee the description
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
has duplicate design defect 0033409 closedAugustoMauch Prevent race condition & improve initialization code in Mobile Server Key by org/client cache 

-  Notes
(0093701)
hgbot (developer)
2017-01-18 16:22

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: f9af11aa6a4c90c3edc9cde15e8485850725dd87
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Jan 18 16:21:53 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/f9af11aa6a4c90c3edc9cde15e8485850725dd87 [^]

Fixes issue 34999: Do more caching and re-organize code in MobileServerProvider in the Replication Module

MobileServerEventHandler/MobileServerOrganizationEventHandler: set Property object in static member, call MobileServerProvider.resetInstance, this cache refresh is a but less precise mobile server definition/organization changes don't occur that much anyway

MobileServerProvider: cache the nodeIds, control synchronized block/methods using boolean members, simplify cache refresh by creating new instance of the method, reorganize the code so the initialization code does not call the original getter initiating the initialization.

---
M src/org/openbravo/replication/symmetricds/eventhandler/MobileServerEventHandler.java
M src/org/openbravo/replication/symmetricds/eventhandler/MobileServerOrganizationEventHandler.java
M src/org/openbravo/replication/symmetricds/util/MobileServerProvider.java
---
(0093913)
AugustoMauch (manager)
2017-01-30 09:20

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2017-01-18 15:43 mtaal New Issue
2017-01-18 15:43 mtaal Assigned To => mtaal
2017-01-18 15:43 mtaal Triggers an Emergency Pack => No
2017-01-18 15:47 mtaal Review Assigned To => AugustoMauch
2017-01-18 16:22 hgbot Checkin
2017-01-18 16:22 hgbot Note Added: 0093701
2017-01-18 16:22 hgbot Status new => resolved
2017-01-18 16:22 hgbot Resolution open => fixed
2017-01-18 16:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/f9af11aa6a4c90c3edc9cde15e8485850725dd87 [^]
2017-01-30 09:20 AugustoMauch Note Added: 0093913
2017-01-30 09:20 AugustoMauch Status resolved => closed
2017-02-07 17:53 AugustoMauch Relationship added has duplicate 0033409


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker