Skip to content

fix(agent): check agent metadata every second instead of minute #8614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Jul 20, 2023

I believe this is the fix for #8577.

When looking at the websocket, metadata keys go over 2 minutes without updating, even when their interval is much lower. This fixes reportMetadataLoop to run every second and properly calculate the interval. A previous refactor set it to tick each minute instead of the previous behavior of each second.

I believe this is the fix for #8577.

When looking at the websocket, metadata keys go over 2 minutes without
updating, even when their interval is much lower. This fixes
`reportMetadataLoop` to run every second and properly calculate the
interval. A previous refactor set it to tick each minute instead of the
previous behavior of each second.
@coadler coadler requested a review from mafredri July 20, 2023 05:18
@coadler coadler self-assigned this Jul 20, 2023
agent/agent.go Outdated
for {
// Ensure all backpressured metadata is posted.
if len(metadataResults) > 1 {
flushAllMetadata()
Copy link
Member

Choose a reason for hiding this comment

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

This could perhaps be moved to after the select below (i.e. when baseTicker.C is triggered). For now it seems to be doing the exact same thing as the select, except when baseTicker.C is triggered. (We probably don't need the len check either.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't really seem to be necessary, so i've just removed it for now

@coadler coadler merged commit 71d4e4e into main Jul 20, 2023
@coadler coadler deleted the colin/metadata-fe-fix branch July 20, 2023 19:03
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2023
@matifali matifali linked an issue Aug 4, 2023 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some metadata disappears from the UI for a long time, repeatedly
2 participants