Repository navigation
Generate native identifiers in creation order - #557
Conversation
Ulid::new() leaves identifiers from one millisecond unordered, so two activity tasks of one completion could be claimed out of authored order under ORDER BY available_at,id. Published PHP uses Laravel's (Symfony's) monotonic ULIDs. Native now draws every identifier, including query task ids, from one process-wide monotonic generator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
|
Run 39505927835 passed all 13 jobs. |
|
|
|



Part of #325.
Problem. Main's Shared Server fixtures run after #499 (run 39472346421) failed one native test:
parallel_all::retry_and_terminal_failure_preserve_member_identity_and_sibling_completion. The first activity poll returned the second authored member of anallgroup.The job's two other failed steps run even after an earlier failure. They need the job network that the steps skipped after the test would have created, so they are consequences of the test failure, not separate failures.
Cause. Native generated every identifier with
Ulid::new(), whose random suffix is not ordered within a millisecond. Workers claim byORDER BY available_at,id, and both tasks of one completion can share a millisecond. The poll then returned them in random order.Published PHP uses Laravel's ULIDs, from Symfony's generator, which increments the previous identifier within the same millisecond. Rows created by one PHP process therefore keep their creation order.
Change.
store::id()now uses one process-wide monotoniculid::Generator, so native identifiers from one process keep creation order as PHP's do.Ulid::new()pairs were ordered; all 9,999 generator pairs were.Checks.
parallel_allpasses on PostgreSQL and MySQL.🤖 Generated with Claude Code