Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034505Openbravo ERP09. Financial managementpublic2016-11-14 18:552017-05-24 12:26
caristu 
AtulOpenbravo 
highminoralways
closedno change required 
5
 
 
aferraz
Core
No
0034505: [clustering] review caching of isMigrated field in CostingStatus class
isMigrated field is cached whether costing is migrated in CostingStatus class.

As CostingStatus is a singleton class, the value is being cached along all the life cycle of the application. Therefore, in a clustered environment that field could have a different value on each node.

This behavior must be reviewed in order to check if we should we care about it on a clustered environment.
In description
clustering
blocks design defect 0034490 acknowledged Triage Platform Base [clustering] Support clustering 
Issue History
2016-11-14 18:55caristuNew Issue
2016-11-14 18:55caristuAssigned To => Triage Finance
2016-11-14 18:55caristuModules => Core
2016-11-14 18:55caristuTriggers an Emergency Pack => No
2016-11-14 18:55caristuRelationship addedrelated to 0034490
2016-11-15 09:14caristuRelationship deletedrelated to 0034490
2016-11-15 09:14caristuRelationship addedcauses 0034490
2016-11-15 09:15caristuRelationship deletedcauses 0034490
2016-11-15 09:15caristuRelationship addedblocks 0034490
2016-11-15 10:23alostaleTag Attached: clustering
2017-03-23 15:02markmm82Assigned ToTriage Finance => AtulOpenbravo
2017-05-24 12:26aferrazReview Assigned To => aferraz
2017-05-24 12:26aferrazNote Added: 0096754
2017-05-24 12:26aferrazStatusnew => closed
2017-05-24 12:26aferrazResolutionopen => no change required

Notes
(0096754)
aferraz   
2017-05-24 12:26   
Whenever CostingStatus.isMigrated() method is called, we check if isMigrated flag has not been initialized and in this case we recalculate it again.
Every time CostingStatus.setMigrated() method is called, a previous call to CostingStatus.isMigrated() method is done in the same thread, so we make sure isMigrated flag has been initialized.

Only the thing is multiple JVM will have their own copy of isMigrated. Each JVM will initialize its own isMigrated but again once the ismigrated flag is set there is no way to change its value. There won't be chance of one JVM having isMigrated = true and other having isMigrated = false.