diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-07-04 17:17:29 +0200 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-07-05 14:04:33 +0200 |
| commit | 7af09db878997d1e5af09e4a3c314e6df5311e55 (patch) | |
| tree | 278452959dc4d5e26d51c93f705aee13e3a8616c /addons/web/static/src/js/fields/relational_fields.js | |
| parent | b27d009ab473a45312a7216feb85a6cc35d33062 (diff) | |
[FIX] web: no concurrent reload on basic model
Before this commit, there was a traceback in the following scenario:
Let's have a kanban view with groupby and a domain.
If we clear the domain then clear the groupby, there could be a crash.
This crash occurs because when we clear the groupby, it performs a `reload`,
and assumes that the datapoint contains grouped data. However, if this
computation takes some time, it is possible to overwrite the datapoint so that
there is no longer grouped data.
This commit fixes the issue by enforcing at most 1 execution of the method
`reload` active at any time. Consequently, successive reloads operations are
now much slower.
Note that it uses the single non-reentrant mutex on the basic_model to enforce
this rule, which means:
- No more concurrent `reload` and `save`.
- If an execution having the mutex in `reload` come accross the same mutex,
it is blocked forever. This is hopefully not the case at the moment,
however a reentrant mutex should be considered in the future.
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
0 files changed, 0 insertions, 0 deletions
