Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 141
    • Merge requests 141
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !820

Merged
Created Jan 04, 2019 by Julien Muchembled@jmOwner

CMFActivity: better date ordering by using micro-precision

  • Overview 6
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: cmfactivity_microsecond
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7