Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 144
    • Merge requests 144
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !2159

Open
Created Sep 19, 2025 by Kazuhiko Shiozaki@kazuhikoOwner
  • Report abuse
Report abuse

Draft: ZSQLCatalog: force using READ COMMITTED isolation for indexation.

  • Overview 4
  • Commits 1
  • Changes 1

This merge request supersedes !1997 (closed).

For the same reason that we are safe to use innodb_locks_unsafe_for_binlog, i.e. we don't use INSERT ... SELECT pattern, it should be safe to use READ COMMITTED isolation level in indexation.

With software/erp5/test/test/benchmarks.py in SlapOS repository, here is the difference of the number of deadlocks.

(below, I use 45448334 as the base ERP5 revision. Deadlock count details below are taken with simple grep and they can be counted twice but the still you can see the trend).

  • (ref: MariaDB 10.4, total duration 10376.7 seconds)
     30 INSERT INTO category
     72 REPLACE INTO delivery

    606 SELECT FOR UPDATE query in CMFActivity (outside SQLLock)
     88 UPDATE query in CMFActivity
  • (ref: MariaDB 11.8, total duration 18002.3 seconds)
     35 INSERT INTO stock
     65 INSERT INTO `quantity_unit_conversion`
    270 DELETE FROM category
    301 REPLACE INTO delivery
  69387 INSERT INTO category

    202 SELECT FOR UPDATE query in CMFActivity (outside SQLLock)
    131 UPDATE query in CMFActivity
  • !2151 only, total duration 18393.5 seconds
     39 INSERT INTO stock
     28 INSERT INTO `quantity_unit_conversion`
    260 DELETE FROM category
    313 REPLACE INTO delivery
  73064 INSERT INTO category

    752 SELECT FOR UPDATE query in CMFActivity (outside SQLLock)
     72 UPDATE query in CMFActivity
  • !2151 + !2159 (this), total duration 10578.9 seconds
     60 REPLACE INTO delivery
     69 INSERT INTO category

    584 SELECT FOR UPDATE query in CMFActivity (outside SQLLock)
     22 UPDATE query in CMFActivity

And here is the comparison of the performance, that is even faster than 10.4 with innodb_locks_unsafe_for_binlog.

11.8-2159

Edited Sep 29, 2025 by Kazuhiko Shiozaki
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: index-read-committed
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7