Skip to content

(no) Pre batch processing task state (Option 3)#6861

Draft
dwsutherland wants to merge 2 commits intocylc:8.6.xfrom
dwsutherland:ds-pre-batch-proc-option3
Draft

(no) Pre batch processing task state (Option 3)#6861
dwsutherland wants to merge 2 commits intocylc:8.6.xfrom
dwsutherland:ds-pre-batch-proc-option3

Conversation

@dwsutherland
Copy link
Copy Markdown
Member

@dwsutherland dwsutherland commented Jul 18, 2025

closes #6567, closes #6860, closes #6859

Tasks batched (for DB read) during a graph walk, and processed at the end of that walk.

Window resizes typically include many walks (for each active task), so the DB will have that many calls.
However, no state-less tasks will exist.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Code covered by existing tests.
  • Changelog entry added.
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders
Copy link
Copy Markdown
Member

oliver-sanders commented Nov 13, 2025

This seems like the right sort of fix (i.e, get the task status right first time).

If I'm reading this correctly:

  • Before we were performing all the DB lookups at once.
  • This change splits it up into smaller batches.

If I'm understanding correctly, the root cause is that the data store is trying to push out incomplete deltas before it has actually gathered all of the required information. This (only?) happens on reload.

If so, could we not just delay sending the deltas (after reload) until they are complete (i.e, after we have finished the first walk)?

@dwsutherland
Copy link
Copy Markdown
Member Author

If I'm understanding correctly, the root cause is that the data store is trying to push out incomplete deltas before it has actually gathered all of the required information. This (only?) happens on reload.

it applies stateless deltas before the historical batch is applied, yes.

This change splits it up into smaller batches.

It also processes the batch before any associated deltas are applied too.
The batches are 1 graph window walk.

@dwsutherland dwsutherland marked this pull request as ready for review November 27, 2025 11:45
@dwsutherland dwsutherland added this to the 8.6.2 milestone Dec 19, 2025
@dwsutherland dwsutherland force-pushed the ds-pre-batch-proc-option3 branch from 53e5fcc to eccba64 Compare December 19, 2025 01:17
@dwsutherland dwsutherland changed the base branch from master to 8.6.x December 19, 2025 01:17
@dwsutherland dwsutherland added bug Something is wrong :( small labels Dec 19, 2025
@dwsutherland
Copy link
Copy Markdown
Member Author

Have rebased this against 8.6.x, it fixes the bug.

@oliver-sanders oliver-sanders modified the milestones: 8.6.2, 8.6.3 Jan 7, 2026
@oliver-sanders
Copy link
Copy Markdown
Member

If I'm understanding correctly, the root cause is that the data store is trying to push out incomplete deltas before it has actually gathered all of the required information. This (only?) happens on reload.

it applies stateless deltas before the historical batch is applied, yes.

I'm not convinced this is the case.

The data store shouldn't yield any deltas until the process has completed (both logically and from the code):

self.publish_deltas = self.get_publish_deltas()

I have also managed to reproduce this example without any historical data to load - #6567 (comment)

Unfortunately, the issue still reproduces on this branch :(

@dwsutherland
Copy link
Copy Markdown
Member Author

The data store shouldn't yield any deltas until the process has completed (both logically and from the code):

Yes, but TUI doesn't get publish deltas, it asks for a dump..
However, yes, I don't think it should be possible.. what get's applied to the data-store should be added deltas (empty state) that have had the historical info applied (actual state).. So what TUI queries should be a coherent data-store where there are no stateless tasks ..

Maybe I need to go back to the drawing board of what I think is happening

@oliver-sanders oliver-sanders marked this pull request as draft February 13, 2026 10:56
@oliver-sanders
Copy link
Copy Markdown
Member

(unassigning this to re-focus my review queue, feel free to re-assign when undrafted)

@oliver-sanders oliver-sanders removed their request for review February 19, 2026 12:52
@oliver-sanders oliver-sanders modified the milestones: 8.6.3, 8.6.x Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is wrong :( small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data store: blank task state

2 participants