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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035470
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Retail Modules] StoreServerminorhave not tried2017-03-09 16:482017-03-18 11:49
ReportermtaalView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision7416d6418ced
ProjectionnoneETAnoneTarget VersionRR17Q2
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

0035470: Code should not adapt the Map instance it gets from a method, but instead call the originating class to adapt the Map

DescriptionSee the code here [1], it gets a Map instance from the SynchronizationEngineProvider.getChannelsWithInitialLoadInProgress() method and changes the Map instance. This works as the Map instance is the same as being kept internally in the SynchronizationEngineProvider. But it is less nice from a encapsulation point of view to adapt the map outside of its owner (the SynchronizationEngineProvider).

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/5f4547f93c1a9a8ba8add123b198ec084e8ff95e#l4.42 [^]
Steps To ReproduceSee description
Proposed SolutionBetter to either call the setter again (makes no difference in the logic really but shows that the resulting map is set back, ignoring multi-threading issues).

But nicest probably to have a removeChannel method on the SynchronizationEngineProvider to remove a channel from the internal Map.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks feature request 0034835 closedAugustoMauch Use another approach for the Table Reload process 

-  Notes
(0094894)
hgbot (developer)
2017-03-10 09:14

Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 7416d6418ced0a003624169ee3c0f7e12f7a14e0
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Mar 10 09:14:09 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7416d6418ced0a003624169ee3c0f7e12f7a14e0 [^]

Fixes issue 35470: Improves encapsulation in server Initial Data Load process

The SynchronizationEngineProvider class keeps a Map to manage the channels whose initial data load is not finished. Before this changeset, this Map was shared with other classes, that r
ead it and modified. Now the map is not shared, and some methods to modify the map have been added to SynchronizationEngineProvider to improve the encapsulation.

---
M src/org/openbravo/replication/symmetricds/SynchronizationEngineProvider.java
M src/org/openbravo/replication/symmetricds/extensions/BatchDatabaseWriterControl.java
---
(0095383)
mtaal (manager)
2017-03-18 11:49

Reviewed and tested

- Issue History
Date Modified Username Field Change
2017-03-09 16:48 mtaal New Issue
2017-03-09 16:48 mtaal Assigned To => AugustoMauch
2017-03-09 16:48 mtaal Triggers an Emergency Pack => No
2017-03-09 16:49 mtaal Relationship added blocks 0034835
2017-03-10 09:14 hgbot Checkin
2017-03-10 09:14 hgbot Note Added: 0094894
2017-03-10 09:14 hgbot Status new => resolved
2017-03-10 09:14 hgbot Resolution open => fixed
2017-03-10 09:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/7416d6418ced0a003624169ee3c0f7e12f7a14e0 [^]
2017-03-18 11:48 mtaal Review Assigned To => mtaal
2017-03-18 11:48 mtaal Proposed Solution updated
2017-03-18 11:49 mtaal Note Added: 0095383
2017-03-18 11:49 mtaal Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker