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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035996
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] StoreServermajorhave not tried2017-05-12 09:522017-06-05 16:40
ReporterAugustoMauchView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revisioncddd90ada4be
ProjectionnoneETAnoneTarget VersionRR17Q2.1
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

0035996: getMobileServersForOrganization and getNodeIdsForOrganization methods should return copies, not original sets

DescriptionThe MobileServerProvider has two methods that return the list of mobile servers / mobile server keys that have access to a given organization, called getMobileServersForOrganization and getNodeIdsForOrganization respectively.

These methods returns a set given an organization ID. The problem is that if the invokers then modify the set, then the original structure maintained in MobileServerProvider will be modified too.

Those methods should return copies of the original sets, to prevent having those sets modified.
Steps To ReproduceIt has been very difficult to reproduce, and only managed to do it in an environment of the BUT's development team when they were testing the Copy Store functionality.

In any case, the change makes a lot of sense, and should be done even if it cannot be reproduced deterministically.

Proposed SolutionReturn a copy of the sets instead of the original ones.

I tested the performance impact of making a copy of a set instead of returning the original one. With a set composed of 300 objects:
- Copying it once took 1ms
- Copying it 100 times took 2 ms
- Copying it 1000 times took 12 ms.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0035982 closedAugustoMauch getMobileServersForOrganization and getNodeIdsForOrganization methods should return copies, not original sets 

-  Notes
(0097139)
mtaal (manager)
2017-06-05 16:40

we will not deliver Q2.1 version

- Issue History
Date Modified Username Field Change
2017-05-15 16:20 mtaal Type defect => backport
2017-05-15 16:20 mtaal Target Version => RR17Q2.1
2017-05-15 16:21 mtaal Assigned To AugustoMauch => mtaal
2017-06-05 16:40 mtaal Note Added: 0097139
2017-06-05 16:40 mtaal Status scheduled => closed
2017-06-05 16:40 mtaal Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker