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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035767
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServerminorhave not tried2017-04-12 12:132017-05-15 09:14
ReporterAugustoMauchView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in VersionRR17Q3
StatusclosedFix in branchFixed in SCM revision
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

0035767: Review synchronized methods in mobile.core, some of them may not be needed

DescriptionThe fix of this issue [1] removed a synchronized clause from a method to get rid of the contention is was being causing.

There are other synchronized methods that should be reviewed, maybe some of them are not needed anymore. For instance the synchronized clause of this method [2] would not be needed if the attribute was initialized eagerly.

Note that we must support a clustered environment, so a synchronized block cannot guarantee that a method is not executed concurrently in different application instances.


[1] https://issues.openbravo.com/view.php?id=35754 [^]
[2] https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/c0b32b2cd2e2/src/org/openbravo/mobile/core/servercontroller/MobileServerRequestExecutor.java#l214 [^]
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035754 closedAugustoMauch MobileServerController.getThisServerDefinition creates contention 

-  Notes
(0096433)
mtaal (manager)
2017-05-06 09:13

See commit, also in clustered environments synchronized methods can make sense to initialize in-memory information in a correct way or preventing threads or other things to be started concurrently.
(0096435)
mtaal (manager)
2017-05-06 09:18

Fixed by this commit:

https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ff07f507ed74 [^]
(0096446)
hgbot (developer)
2017-05-08 09:09

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 347ee3bf76175ffb4ba52a9042ab0f13493002fe
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon May 08 09:09:36 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/347ee3bf76175ffb4ba52a9042ab0f13493002fe [^]

Related to issue 35767: Review synchronized methods in mobile.core, some of them may not be needed
Removed synchronized statement as not needed here

---
M src/org/openbravo/retail/storeserver/synchronization/eventhandler/OrderEventHandler.java
---
(0096447)
hgbot (developer)
2017-05-08 09:11

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 00bf2946bcc1f6ceee38ceb1d5997d2dc7512aff
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Mon May 08 09:10:42 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/00bf2946bcc1f6ceee38ceb1d5997d2dc7512aff [^]

Related to issue 35767: Review synchronized methods in mobile.core, some of them may not be needed
Removed synchronized and use mobile server definition id instead of reading object itself

---
M src/org/openbravo/retail/storeserver/synchronization/StoreServerVersionHandler.java
---
(0096583)
AugustoMauch (manager)
2017-05-15 09:14

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2017-04-12 12:13 AugustoMauch New Issue
2017-04-12 12:13 AugustoMauch Assigned To => StoreServer
2017-04-12 12:13 AugustoMauch Triggers an Emergency Pack => No
2017-04-12 12:13 AugustoMauch Relationship added related to 0035754
2017-05-01 17:20 mtaal Assigned To StoreServer => mtaal
2017-05-06 09:13 mtaal Note Added: 0096433
2017-05-06 09:17 mtaal Review Assigned To => AugustoMauch
2017-05-06 09:18 mtaal Status new => acknowledged
2017-05-06 09:18 mtaal Status acknowledged => scheduled
2017-05-06 09:18 mtaal Note Added: 0096435
2017-05-06 09:18 mtaal Status scheduled => resolved
2017-05-06 09:18 mtaal Fixed in Version => RR17Q3
2017-05-06 09:18 mtaal Resolution open => fixed
2017-05-08 09:09 hgbot Checkin
2017-05-08 09:09 hgbot Note Added: 0096446
2017-05-08 09:11 hgbot Checkin
2017-05-08 09:11 hgbot Note Added: 0096447
2017-05-15 09:12 AugustoMauch Description Updated View Revisions
2017-05-15 09:14 AugustoMauch Note Added: 0096583
2017-05-15 09:14 AugustoMauch Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker