Skip to content

Discovery.Manager: close sync ch after sender() is stopped - #14465

Merged
bboreham merged 5 commits into
prometheus:mainfrom
littlepangdi:discovery-manager-shutdown-ch
Jul 11, 2025
Merged

bboreham merged 5 commits into
prometheus:mainfrom
littlepangdi:discovery-manager-shutdown-ch

Conversation

@littlepangdi

@littlepangdi littlepangdi commented Jul 12, 2024 •

Copy link
Copy Markdown
Contributor

This is a reopen PR to fix #10217 , , a possible memory leak when quoating manager.Sync() outside manager's lifecycle(more background in grafana/loki#5238).

Former discuss can be found in this closed PR #10218.
Based on advice from @roidelapluie , I've updated using pattern to ts, ok := <- tsets in both scrape/manager.go and notifier/notifier.go

@littlepangdi

Copy link
Copy Markdown
Contributor Author

@roidelapluie @bboreham Hi, sorry for missing your reply for so long, hopefully this one still useful :)

@bboreham bboreham left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks ok, thanks.

@bboreham

bboreham commented Jan 7, 2025

Copy link
Copy Markdown
Member

@littlepangdi can you look at the merge conflict please?
@roidelapluie last chance to comment before we merge.

@github-actions github-actions Bot removed the stale label Jan 11, 2025
@littlepangdi

Copy link
Copy Markdown
Contributor Author

ok I'll do it today

@littlepangdi

littlepangdi commented Mar 5, 2025 •

Copy link
Copy Markdown
Contributor Author

@littlepangdi can you look at the merge conflict please? @roidelapluie last chance to comment before we merge.

@bboreham thanks again for reminding ~
@roidelapluie hi, I've resolved merge conflict, could you please approve this one ?

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.

Discovery.Manager not closing syncCh after sending stopped

2 participants