odoo/openerp
Xavier Morel 3049760fe6 [FIX] race condition in ir.ui.menu leading to incomplete menus in web client
See bug, issue occurs with variable frequency when changing between
simple and extended views in a user account (non-administrator at
least): saving the user account leads to a clearing of the menu cache,
this is followed by two search/read in parallel (one to get the full
menu listing and one to get the list of applications for the home
page), which leads to ir_ui_menu.search (thus
ir_ui_menu._filter_visible_menus) being called concurrently, and this
apparently somehow wrecks havoc on some browse_record's caches
yielding to incoherent behaviors (menus which do have children in db
not having children in the browse_record, and thus being pruned from
the list of menus).

Putting a big lock around 1. clear_cache (just in case) and
2. _filter_visible_menu (to make cache-filling essentially atomic)
seems to solve the issue or at least make it disappear, ideally more
time should be spent understanding what breaks in browse_record.

A reentrant lock is needed as _filter_visible_menu may recurse when
accessing e.g. a menu's child_id (which yield a
search([parent_id=menu.id]) and thus a _filter_visible_menu)

lp bug: https://launchpad.net/bugs/920332 fixed

bzr revid: xmo@openerp.com-20120125115823-rpu03zdv14t11lp3
2012-01-25 12:58:23 +01:00
..
addons [FIX] race condition in ir.ui.menu leading to incomplete menus in web client 2012-01-25 12:58:23 +01:00
conf [MERGE] sync with latest trunk 2011-09-28 23:13:26 +02:00
db [REF] openerp.modules 2011-04-20 17:27:18 +02:00
modules [IMP] openerp.modules: updated initialize_sys_path() docstring (although its name is now inaccurate). 2012-01-10 10:27:30 +01:00
osv [IMP] move browse_record to logging, __init__ docstring to sphinx info fields 2012-01-25 12:34:29 +01:00
pychart [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
report [IMP] optimize imports in record files 2012-01-25 12:32:48 +01:00
service [MERGE] cleaned some imports, removed some code for older python versions. 2012-01-18 17:03:05 +01:00
test [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
tests [IMP] gunicorn: changed `print` with `logging.info`. 2012-01-20 17:04:09 +01:00
tools [IMP] gunicorn: moved gunicorn hook to openerp.wsgi (just like previous hooks), added new command-line options. 2012-01-20 16:00:50 +01:00
wizard [IMP] tools: removed our copy of the copy module. 2012-01-18 12:57:43 +01:00
workflow [FIX] workflow returning actions 2011-12-11 11:21:40 +01:00
.apidoc API doc: move settings file from bin/ to openerp/ 2011-06-23 12:08:07 +03:00
PKG-INFO [IMP] openerp python module. 2011-02-07 13:57:23 +01:00
__init__.py [MERGE] sync with latest trunk 2011-09-27 18:51:33 +02:00
cron.py [FIX] cron: cleanup wakeup pointers after processing them 2011-09-29 01:54:09 +02:00
exceptions.py [FIX] xmlrpc: handle old/new exceptions with old/new clients. 2011-09-30 10:50:12 +02:00
import_xml.rng [IMP] rng,convert: add support for report `usage` attribute 2011-10-10 16:22:26 +02:00
loglevels.py [IMP] tools.ustr: fix possible stack overflow for exception_to_unicode + tabs->spaces 2011-10-07 16:48:06 +02:00
netsvc.py [REF] remove unused import, always import literal_eval from tools.safe_eval. 2012-01-15 22:42:14 +01:00
pooler.py [IMP] registry: whene deleting a registry, also delete its cache and cron. 2011-07-13 17:35:21 +02:00
release.py [REL] OpenERP 6.1rc1 2012-01-12 20:21:07 +01:00
run_tests.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
sql_db.py [MERGE] cleaned some imports, removed some code for older python versions. 2012-01-18 17:03:05 +01:00
tiny_socket.py [IMP] Added missing vim mode lines 2011-11-22 09:58:48 +01:00
wsgi.py [MERGE] added resources (virt. memory and CPU time) limits when using gunicorn. 2012-01-20 18:20:18 +01:00