Skip to content

[-] fix QueryMeasurements nil pointer dereference, fixes #766#767

Merged
pashagolub merged 2 commits intomasterfrom
766-nil-pointer-dereference
May 23, 2025
Merged

[-] fix QueryMeasurements nil pointer dereference, fixes #766#767
pashagolub merged 2 commits intomasterfrom
766-nil-pointer-dereference

Conversation

@pashagolub
Copy link
Copy Markdown
Collaborator

@pashagolub pashagolub commented May 23, 2025

  • keep existing connection in SourceConns.SyncFromReader()

Since SourceConn passed to reapMetricMeasurements() it's crucial to keep the existing source with connection alive, so the reaper keeps it's work. And there is no need to close the connection because it might be used right now in some metric fetcher. Let Reaper to cancel all disabled monitored sources in the main loop of Reap() function.

Since `SourceConn` passed to reapMetricMeasurements() it's crucial
to keep the existing source with connection alive, so the reaper
keeps it's work. And there is no need to close the connection because
it might be used right now in some metric fetcher. Let Reaper to cancel
all disabled monitored sources in the main loop of Reap() function.
@pashagolub pashagolub linked an issue May 23, 2025 that may be closed by this pull request
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 15214258306

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 55.157%

Files with Coverage Reduction New Missed Lines %
internal/reaper/reaper.go 1 0.0%
Totals Coverage Status
Change from base Build 15166761031: -0.04%
Covered Lines: 2444
Relevant Lines: 4431

💛 - Coveralls

@pashagolub pashagolub self-assigned this May 23, 2025
@pashagolub pashagolub added bug Something isn't working critical Should be implemented ASAP labels May 23, 2025
@pashagolub pashagolub merged commit 861c882 into master May 23, 2025
9 checks passed
@pashagolub pashagolub deleted the 766-nil-pointer-dereference branch May 23, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working critical Should be implemented ASAP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

segmentation violation - nil pointer dereference

2 participants