Consider ordering node revisions by timestamp instead of version ID

Created on 11 April 2013, almost 12 years ago
Updated 19 March 2025, 15 days ago

Problem/Motivation

We have several Drupal sites set up running on MSSQL, running a multi-master replication scheme (Merge Replication). The way PK conflict avoidance is handled in this scheme is by assigning different ranges of an autoincrementing PK to different nodes (e.g. DB1 has 1-1000, DB2 has 1001-2000, etc.). This poses issues for us in editing content as node_revision VIDs appear to be prioritized and ordered by vid, rather than timestamp. This can lead to pages being in an uneditable state without intervention from a DBA as a vid may jump a significant number of numbers. Currently, the only resolution is to revise the high-numbered revision to generate an appropriate low numbered one, then deleting the offending node_revision.

I would imagine that the fix would be to use the PK as an identifier only, sorting and prioritizing based on last modified timestamp.

πŸ“Œ Task
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

node system

Created by

πŸ‡ΊπŸ‡ΈUnited States ncouraud

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024