diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-08-23 14:19:15 +0200 |
|---|---|---|
| committer | Christophe Simonis <KangOl@users.noreply.github.com> | 2017-08-29 16:54:32 +0200 |
| commit | 122242233358ad95d40a3e65229b65684fa3222c (patch) | |
| tree | f41b20c1bf633a1059b3af60ee9021034240d036 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 209fd529f829b7345542afc1e0697056e50d3afd (diff) | |
[FIX] p3: race condition when *reloading* an existing db
When re-launching Odoo on an existing database in Python 3.6[0] it's
possible that the scheduler will preempt the main thread
mid-module-import and run the cron thread which causes registry (and
module) initialisation with only a subset of the Python files loaded
and thus e.g. tries loading auth_crypt with a registry in which none
of res has been loaded makes for interesting situations.
Delay spawning the cron thread until *after* the registry preload at
least, though I don't think that actually entirely fixes the issue.
[0] and probably in any Python >= 3.3, I'm guessing it's related to
the per-module import locks which replaced the old global lock:
https://docs.python.org/3.3/whatsnew/3.3.html#a-finer-grained-import-lock
though since ir.cron has little reason to import anything it could
also just be Python 3 scheduler changes which allow/cause a
context-switch during imports while the Python 2 scheduler would
not allow that. IDK.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
