Skip to content

Conversation

@brunotm
Copy link
Collaborator

@brunotm brunotm commented Oct 14, 2025

This change move the LLO streams observations into a async continuous loop that provides pre-fetched stream values to the data source, decoupling the pipeline runs from the plugin observe call. Allows for better data freshness, round throughput and resource consumption of the observation stage.

@brunotm brunotm added the build-publish Build and Publish image to SDLC label Oct 14, 2025
@brunotm brunotm force-pushed the bm/DS-892-observation-resource-usage branch 9 times, most recently from a07f42d to 79c3e64 Compare October 17, 2025 14:04
@brunotm brunotm marked this pull request as ready for review October 17, 2025 16:31
@brunotm brunotm requested review from a team as code owners October 17, 2025 16:31
ecPablo
ecPablo previously approved these changes Oct 17, 2025
Copy link
Contributor

@ecPablo ecPablo left a comment

Choose a reason for hiding this comment

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

approving deployment/ folder related changes

@brunotm brunotm force-pushed the bm/DS-892-observation-resource-usage branch from 79c3e64 to e4e68f2 Compare October 20, 2025 08:15
@cl-sonarqube-production
Copy link

@brunotm brunotm requested review from ecPablo and jmank88 October 20, 2025 12:31
@ro-tex ro-tex added this pull request to the merge queue Oct 20, 2025
lggr := logger.With(d.lggr, "observationTimestamp", opts.ObservationTimestamp(), "configDigest", opts.ConfigDigest(), "seqNr", opts.OutCtx().SeqNr)
// Observation loop logic
{
// Update the list of streams to observe for this config digest and set the timeout
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Update the list of streams to observe for this config digest and set the timeout
// Update the list of streams to observe and set the timeout

}

if deadline, ok := ctx.Deadline(); ok {
osv.observationTimeout = time.Until(deadline)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little odd. On line 215 we check if the observation is still valid by comparing to 2* this value, which seems a little arbitrary. It would be fine and predictable if we compared to the initial value of 250ms but this is a little strange.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We set a default value on L334 to ensure we don't exhaust resources if by any chance this gets set to 0 on the on chain config.

here we extract the deadline (which is max obs duration) which defines both the pace and the timeout. hence 2* for the validity of the TTL. This ensures both the cache and the pace are adjusted to the expected loop run-time. ie. we have enough ttl and and pace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants