Problem

"My requests" and "My tasks" cache on cache tags, and both render the current-step column, which reads a run's parked token rows. The column declares no dependency on those rows: it extends FieldPluginBase and adds neither cache tags nor a max-age. Once a page is cached the column keeps naming the step the run was on when it was rendered, and nothing expires it when the run advances.

The tag that would expire it is not invalidated everywhere either. The engine claims and moves token rows with guarded UPDATE statements, because the guard is the point: the row changes only if it is still in the state the caller decided from. Such a write skips what a save would do afterwards, so RawUpdateTrait::refreshAfterRawUpdate() resets the entity cache and invalidates the row's tags by hand. Seven raw writes call it. Six do not:

  • SubprocessCoordinator: three writes clearing and re-arming the parent's deadline around a child launch or re-launch.
  • TimeoutSweeper: the WAITING to ACTIVE claim, and the timer claim that clears a deadline.
  • WorkflowExecutor: the PARKED to ACTIVE claim that resumes a subprocess parent.

Either half alone is inert, which is why they are one issue: an undeclared column stays stale however faithfully the tag is invalidated, and an invalidated tag reaches nothing the column did not declare.

This is the family of #3620612, which covered the per-viewer surfaces; the current-step column was missed.

Proposed resolution

  • Declare on the column the cacheability it reads, so a token write expires it.
  • Call refreshAfterRawUpdate() at the six sites, guarded on the update having reported a change, as the seven existing calls are.

Remaining tasks

  • A test that the column expires when a token moves, and one per raw write that its tag is invalidated.

This issue summary was drafted with the assistance of an AI agent (Claude). The analysis and the wording were reviewed by me before posting, and accountability for the content is mine.

Issue fork orchestra-3621216

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review
mably’s picture

Title: Expire the current-step column when the token it reads moves » Declare the current-step column's cacheability, and invalidate the tags at every guarded write

  • mably committed 3f153047 on 1.x
    fix: #3621216 Declare the current-step column's cacheability, and...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.