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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027733
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementminorsometimes2014-10-02 07:572014-10-02 07:58
ReporteralostaleView Statuspublic 
Assigned Todmiguelez 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027733: M_InOut post allows modifications while the document is being processed

DescriptionLooking at the code in M_InOut_Post it:

1. executes a number of validations
2. locks header and lines (select for update) to process them

In case while execution of step 2, another session tries to do modifications on the document (header or lines) that is being processed, as it is locked, will wait till process finishes, and they will fail at this moment because it is not allowed to change a processed document.

But if concurrent document modification occurs while step 1 is in execution, as there is no lock yet, it will be allowed. This can end up in uncontrolled situations, ie. it is possible one of the checks that were already satisfied to be broken by the new modifications which won't be checked again so the document will be finally processed in this inconsistent state.
Steps To ReproduceI couldn't reproduce it in a real use case.

1 Create a shipment/receipt with big number of lines
2 Process it
3 In another browser session open it and try to modify its lines while process is still in validations step
Proposed SolutionMove the select for updates to the beginning of the process so document is locked since the beginning warranting validations are done against the same data the actual process is done.

Review other document processes (C_order_Post, C_Invoice_Post...) to find the same pattern.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0027713 closededuardo_Argal slow post of goods shipment if there are many storage detail for that product 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-10-02 07:57 alostale New Issue
2014-10-02 07:57 alostale Assigned To => dmiguelez
2014-10-02 07:57 alostale Modules => Core
2014-10-02 07:57 alostale Triggers an Emergency Pack => No
2014-10-02 07:58 alostale Relationship added related to 0027713


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker