Issue 11401

Title
Refresh pool can break any code at any time
Priority
bug
Status
in-progress
Nosy list
ced, yangoon
Assigned to
ced
Keywords

Created on 2022-04-11.19:00:31 by ced, last changed 5 months ago by yangoon.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-04-11.19:00:31

As shown in issue11400, the pool can be refresh at any time since rev 32cd371b3e9c and so code using pool instance can also in many cases:

  • The pool instance has no more objects, this can be solved by storing the _pool on the instance
  • The pool singleton for a database can be stopped (not initialized) at any time. I see at least two possible solutions:
    • Keep the previous pool instance and use it as fallback if the current one is not initialized
    • Raise a specific exception so the dispatcher, cron or worker can retry it with a initialized pool.
History
Date User Action Args
2022-04-11 20:33:32yangoonsetnosy: + yangoon
2022-04-11 19:00:31cedcreate