[receiver/splunkenterprise] send search job TTL in seconds instead of nanoseconds - #50941
Open
grvwy wants to merge 1 commit into
Open
[receiver/splunkenterprise] send search job TTL in seconds instead of nanoseconds#50941grvwy wants to merge 1 commit into
grvwy wants to merge 1 commit into
Conversation
… nanoseconds setSearchJobTTLByID formatted the configured Timeout with %d. Because that value is a time.Duration, %d emits its raw nanosecond count rather than seconds, and Splunk's setttl action reads the argument as seconds. A default timeout of 60s therefore asked Splunk to retain every dispatched search job for roughly 1900 years, so artifacts accumulated in the dispatch directory until the search partition filled and Splunk reported extreme search lag. Convert the duration to whole seconds, and add a regression test covering the control request, which previously had no coverage at all. Assisted-by: Claude Opus 5
|
|
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
|
grvwy
marked this pull request as ready for review
September 12, 2026 00:36
Member
|
/workflow-approve |
Author
|
This was bug was introduced in v0.126.0 PR #39569 just as an FYI if you'd like to backport it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
setSearchJobTTLByIDformatted the configured timeout with%dwhich emits raw nanosecond count rather than seconds and Splunks setttl action reads the argument as seconds. A default timeout of 60s therefore dispatched every search job in Splunk with a lifespan of roughly 1902 years. Artifacts accumulated in the dispatch directory until parition filled and Splunk reported extreme search lag.Converted the duration to whole seconds and added a tests for regression and lack of tests for this bug.
Link to tracking issue
Fixes #50940
Testing
TestSetSearchJobTTLByIDtoscraper_test.go. Table-driven over three timeouts: 60s -> 60, 11s -> 11, 2m -> 120expected: "60"atcual: "60000000000".Documentation
No documentation needed except comments.
Authorship