On 2017-08-28 12:14, Sergi Almacellas Abellana wrote: > Hi, > > Currently there is a weird behavior if new modules are installed when > running multiple instances of trytond (as separate process). The problem > is that only one process has the updated pool definition and the other > process will fail with a KeyError when try to get the new created models. > > I think this can be solved like we sync the cache resets between instances: > > 1. Store on the database the pool version. > 2. Each time the pool is updated, a new version is saved on the database. > 3. Before staring a request that requires the pool, fetch the version > from database and check if it matches with the current pool version > (stored in memory). If it does not match, reload the pool before > processing the request. > > This has the drawback that adds one additional query *per request*. > > Thoughts?
For me, activate modules from the UI has always been a gadget (or for simple setup). On larger setup with multiple server, the activation should be part of a larger maintenance process which should restart all of them. My second point, is that adding a extra query for each request just of the very rare case of activating a new module is really too much costly. Indeed I would prefer to have a configuration option that disable the activation of module from the UI. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20170828104648.GC3668%40kei.