Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0049887 | Openbravo ERP | A. Platform | public | 2022-07-27 12:43 | 2022-07-27 12:44 |
Reporter | marvintm | ||||
Assigned To | Triage Platform Base | ||||
Priority | normal | Severity | major | Reproducibility | random |
Status | new | Resolution | open | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Review Assigned To | |||||
OBNetwork customer | |||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0049887: It should not be possible to execute more than one state action concurrently | ||||
Description | The State API introduced in 20Q4 as part of the IndexedDB project currently allows to execute multiple state actions concurrently. This can happen because the first stage of the action execution (the ActionPreparation phase) may be asynchronous, and in this case, the event loop will then allow other functions to be called, and they could then launch a different action. The infrastructure is currently not restricting this, and it may lead to inconsistent behavior, as both actions will be executed, generating separate final states, and only the one that finishes later will prevail, "reverting" the state generated by the other action. | ||||
Steps To Reproduce | - Execute two calls to an action that includes an asynchronous action preparation. - Notice that both of them are called. This is wrong. | ||||
Proposed Solution | There are two things that must be checked: - First, although it is currently not possible to call an action from inside another action function, it seems it may be possible to do this from an ActionPreparation. If this is possible, it should be restricted. - Then, it should also not be possible to execute an action from any component while another action is being executed. The infrastructure should also be able to detect this, and restrict it. In both cases, we propose the execution to fail, like it currently does when trying to call an action from inside the action. However, once we go through the integration, depending on the results, we may need to discuss again to think what is the best course of action. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2022-07-27 12:43 | marvintm | New Issue | |||
2022-07-27 12:43 | marvintm | Assigned To | => Triage Platform Base | ||
2022-07-27 12:43 | marvintm | Modules | => Core | ||
2022-07-27 12:43 | marvintm | Triggers an Emergency Pack | => No | ||
2022-07-27 12:44 | marvintm | Proposed Solution updated |
There are no notes attached to this issue. |