Community mailing list archives

community@mail.odoo.com

Re: Odoo Performance and concurrency locks

by
Antony Lesuisse (al)
- 09/14/2015 17:21:51
That very intersting too, to problem is to flag from the route (or method) if 
the transcation will be RO or not. At the moment we dont now at the start of 
the request, so any transction might decide to write at any time.

For example read_group for analysis view could be flagged as read only. This 
would have the advantage of be able to use slave postgres replica for such 
queries.

We could add a flag in @route(readonly=True) and on @api.multi(readonly=True). 
I have task pending, for months, about rewriting the http request layer. We 
will start working on it as soon as v9 is released.

On 09/14/2015 08:53 PM, Raphaël Valyi wrote:
> Hello folks,
>
> this is an old topic and as there will be the opportunity to make important
> changes in the new release I'll suggest again to study something: if I'm not
> wrong, in the Tryton fork they created a "readonly cursor", that is any
> request hitting the server for read, fields_view_get or other strictly read
> only requests will borrow a special cursor to the pool that that is readonly,
> so I guess this will overall be more efficient than the serialized
> transactions we use systematically in Odoo. Any idea?
>
> On Mon, Sep 14, 2015 at 2:09 PM, Nhomar Hernández <nhomar@gmail.com
> <mailto:nhomar@gmail.com>> wrote:
>
>
>     2015-09-14 10:52 GMT-05:00 Olivier Dony <odo@openerp.com
>     <mailto:odo@openerp.com>>:
>
>         2b. As of PG 9.3, you should not see TransactionRollbackErrors caused
>         by logins unless your transactions are actively updating user records
>         themselves. This should not happen much with the standard Odoo
>         distribution.
>
>
>     IMHO, it is happening to me in several environments variations, if you ar
>     open to fix this i can prepare for you a set of use cases.
>
>     But yes with Psql > 9.3 it is not happening as frequent as others but it
>     happends at the end,
>
>     I think my frien we should look deeper on the algorithms to fix it in some
>     point.
>
>     regards.
>
>
>     --
>     --------------------
>     Saludos Cordiales
>
>     CEO at Vauxoo  Odoo's Gold Partner.
>     
>     --
>     Nhomar Hernandez
>     http://about.me/nhomar 
>
>     _______________________________________________
>     Mailing-List: https://www.odoo.com/groups/community-59
>     Post to: mailto:community@mail.odoo.com <mailto:community@mail.odoo.com>
>     Unsubscribe: https://www.odoo.com/groups?unsubscribe
>
>
>
>
> --
> Raphaël Valyi
> Founder and consultant
> http://twitter.com/rvalyi 
> +55 21 3942-2434
> www.akretion.com 
>
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>