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
  • !820

CMFActivity: better date ordering by using micro-precision

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Julien Muchembled requested to merge cmfactivity_microsecond into master Jan 04, 2019
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 10

Originally, uids somehow sorted messages by date of insertion, in particular for those that were created within the same second. But since random uids, such messages became validated or processed in random order.

Note however that by default, messages created in the same transaction all have exactly the same date, so commit a42da4de ("CMFActivity: Do not use offset for scanning messages to validate.") forces us to keep the ordering on uids (in addition to priority/date).

Existing instances will upgrade automatically, using the already existing code to upgrade tables in a generic way. You should see the following logs:

INFO CMFActivity 'message_queue' table upgraded
ALTER TABLE message_queue
  MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
  MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
INFO CMFActivity 'message_job' table upgraded
ALTER TABLE message_job
  MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
  MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
INFO CMFActivity 'message' table upgraded
ALTER TABLE message
  MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
  MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cmfactivity_microsecond
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7