Skip to content

live/pipeline: Propagate loading state upwards#798

Merged
victorges merged 12 commits intomainfrom
vg/feat/propagate-loading
Sep 24, 2025
Merged

live/pipeline: Propagate loading state upwards#798
victorges merged 12 commits intomainfrom
vg/feat/propagate-loading

Conversation

@victorges
Copy link
Contributor

@victorges victorges commented Sep 16, 2025

This is to propagate the state of when the pipeline process is reloading the pipeline.

This is mainly useful for when the stream ends, where we reload the default params again.
In case these default params require a reload, this will now make sure that the Orchestrator
will not accept any streams while that reload is happening.

This is the main PR for INF-297

@victorges victorges force-pushed the vg/feat/propagate-loading branch from 18da5f9 to f284fbe Compare September 19, 2025 03:05
Just in case os.exit fails (thats a possibility in python off course)
@victorges
Copy link
Contributor Author

Link with INF-297


with self.pipeline_ready_time.get_lock():
self.pipeline_ready_time.value = time.time()
self.pipeline_ready.set()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since pipeline_ready is set outside of the lock for pipeline_ready_time then I guess there is a very small chance of them not being set together, but glancing through the usage here, the risk seems minimal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah and since we always check pipeline_ready before checking the time, we only need to make sure that we only set the flag after having set the time which is what we do here. Unless there's a crazy race condition of going true->false->true but I think that's unrealistic, and I can't think of a big impact even then.

Another alternative would be using the pipeline_ready_time itself as the flag for "is ready", setting it to 0 when not ready. I tried that first but thought the code was less clear so preferred the "split" approach anyway.

@victorges victorges merged commit dbac3a7 into main Sep 24, 2025
17 checks passed
@victorges victorges deleted the vg/feat/propagate-loading branch September 24, 2025 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants