Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • 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
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1784

ZMySQLDA: reconnect on mariadb's Connection was killed

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge fix/mariadb-1927 into master May 10, 2023
  • Overview 0
  • Commits 1
  • Pipelines 3
  • Changes 1

After server restarts, mariadb uses an error 1927 which is mariadb specific, with no corresponding constant in CR module when server restart. This is the case at least with mariadb 10.3.38.

This fix the following problem:

  • start zope and use mariadb connection
  • restart mariadb
  • use mariadb connection again, see an error:
    Error Type: OperationalError
    Error Value: (1927, 'Connection was killed')

This change to treat 1927 as an error for which we can reconnect and retry the query. Some other connectors do it, for example sqlalchemy in https://github.com/sqlalchemy/sqlalchemy/issues/5493

Edited May 11, 2023 by Jérome Perrin
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/mariadb-1927
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7