Skip to content
Snippets Groups Projects
  1. Dec 01, 2022
  2. Nov 28, 2022
  3. Nov 22, 2022
  4. Nov 15, 2022
  5. Nov 14, 2022
  6. Nov 09, 2022
  7. Nov 08, 2022
  8. Oct 21, 2022
  9. Oct 14, 2022
  10. Oct 11, 2022
  11. Oct 06, 2022
  12. Oct 04, 2022
  13. Sep 29, 2022
  14. Sep 27, 2022
  15. Sep 26, 2022
  16. Sep 05, 2022
  17. Aug 29, 2022
  18. Aug 26, 2022
  19. Aug 25, 2022
  20. Aug 18, 2022
  21. Aug 10, 2022
  22. Aug 08, 2022
  23. Aug 05, 2022
  24. Aug 04, 2022
  25. Jul 30, 2022
  26. Jul 27, 2022
    • Lin Wenwen's avatar
      [FIX] base: serialization bug when acquiring cron · 684750a0
      Lin Wenwen authored
      
      Start Odoo with multiple cron threads (e.g. --max-cron-threads=4),
      trigger many crons at once, there is a chance one of the cron thread
      fails due to a serialization error.
      
      Inside of the `_acquire_one_job` function, the query evaluates many rows
      to find one that fit multiple requirements. Two of those requirements
      are (1) that the `nextcall` of the row is in the past or (2) that it
      exists a cron trigger for that cron with a `call_at` in the past.
      
      In case the `nextcall` of one of those rows is modified or the cron
      triggers are removed by another transaction then there can be a
      serialisation failure in the current transaction. This serialisation
      error is important, it prevents the current cron worker from acquiring a
      cron job that has been processed in another cron worker.
      
      The problem is that that postgres doesn't tell which row was modified by
      the other transaction (=processed by another worker cron) so it is not
      possible to just skip that cron and continue with the others.
      
      Our solution is to limit the WHERE clause of the `_acquire_one_job`
      function to a single row. In case there is a serialization failure we
      know the cron was processed in another job and we can skip it.
      
      Closes #96584
      
      closes odoo/odoo#92387
      
      Signed-off-by: default avatarJulien Castiaux <juc@odoo.com>
      Co-authored-by: default avatarJulien Castiaux <juc@odoo.com>
      684750a0
  27. Jul 26, 2022
  28. Jul 19, 2022
  29. Jul 14, 2022
Loading