RDKEMW-22611: Suppress false-positive AAMP_ERR_audioDiscontinue marker - #1822
Conversation
The telemetry marker AAMP_ERR_audioDiscontinue is pattern-matched from the AAMPLOG_WARN "Checking HasDiscontinuity for position" log line in GetNextFragmentUriFromPlaylist. On HLS linear streams this WARN fires on every discontinuity sync attempt, including the normal transient case where the audio playlist has a new #EXT-X-DISCONTINUITY tag one refresh cycle ahead of the video playlist. That condition always self-resolves within ~1 s, making the marker a false positive. Fix: Demote the per-attempt log from WARN to INFO so the pattern matcher no longer fires for transient latency events. The genuine failure path where HasDiscontinuityAroundPosition returns false after exhausting all refresh retries retains WARN severity (message updated: after all retries). Root cause: HLS CMAF live stream delivers multiple EXT-X-DISCONTINUITY tags within a single sliding playlist window. Audio and video playlist threads refresh independently; audio consistently sees each new discontinuity PDT one refresh cycle ahead of video, causing a miss on the first scan. Every miss emitted the WARN triggering the marker, even though all misses recovered within one cycle. L1 tests added (fragmentcollector_hls suite): - ExactPdtMatch_ReturnsTrue - PdtWithinTolerance_ReturnsTrue - PdtDiffExceedsTolerance_ReturnsFalse - EmptyIndex_ReturnsFalse - NoPdt_PositionInWindow_ReturnsTrue - NoPdt_PositionOutsideWindow_ReturnsFalse - MultipleEntries_MatchesCurrentPdt Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to suppress false-positive AAMP_ERR_audioDiscontinue telemetry by demoting a per-attempt discontinuity-sync log in TrackState::GetNextFragmentUriFromPlaylist() from WARN to INFO, while keeping a WARN on the genuine “discontinuity pairing failed” path. It also adds L1 coverage for TrackState::HasDiscontinuityAroundPosition() to exercise PDT and non-PDT pairing scenarios relevant to the discontinuity-sync behavior.
Changes:
- Demote
"Checking HasDiscontinuity for position..."fromAAMPLOG_WARN→AAMPLOG_INFOand clarify the finalWARNmessage on failure. - Add new L1 test cases covering PDT matching/tolerance and non-PDT position-window matching for
HasDiscontinuityAroundPosition(). - Wire the new test file into the existing
fragmentcollector_hlsutest target.
Scores: Completeness 9/10, Assumptions 8/10, Clarity 9/10, CostRisk 5/10 | Critique: Solid context and acceptance intent; the diff includes a large new test file which increases review surface. | Improve: Add the exact telemetry pattern-matcher rule (or its key condition, e.g., “WARN-only”) to make the logging change fully verifiable from repo context.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
fragmentcollector_hls.cpp |
Demotes a per-attempt discontinuity-check log from WARN to INFO; updates WARN text on final failure. |
test/utests/tests/fragmentcollector_hls/CMakeLists.txt |
Adds the new discontinuity test source to the existing fragmentcollector_hls test executable. |
test/utests/tests/fragmentcollector_hls/HasDiscontinuityAroundPositionTests.cpp |
New L1 tests covering PDT and non-PDT discontinuity pairing logic in HasDiscontinuityAroundPosition(). |
Suppressed comments (1)
test/utests/tests/fragmentcollector_hls/HasDiscontinuityAroundPositionTests.cpp:135
- This
ifstatement lacks braces. The repository C++ guidelines require braces for all conditional blocks (including single-line bodies) to avoid accidental logic errors when adding statements later.
if (gpGlobalConfig == nullptr)
gpGlobalConfig = new AampConfig();
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The telemetry marker AAMP_ERR_audioDiscontinue is pattern-matched from the AAMPLOG_WARN "Checking HasDiscontinuity for position" log line in GetNextFragmentUriFromPlaylist. On HLS linear streams this WARN fires on every discontinuity sync attempt, including the normal transient case where the audio playlist has a new #EXT-X-DISCONTINUITY tag one refresh cycle ahead of the video playlist. That condition always self-resolves within ~1 s, making the marker a false positive.
Fix: Demote the per-attempt log from WARN to INFO so the pattern matcher no longer fires for transient latency events. The genuine failure path where HasDiscontinuityAroundPosition returns false after exhausting all refresh retries retains WARN severity (message updated: after all retries).
Root cause: HLS CMAF live stream delivers multiple EXT-X-DISCONTINUITY tags within a single sliding playlist window. Audio and video playlist threads refresh independently; audio consistently sees each new discontinuity PDT one refresh cycle ahead of video, causing a miss on the first scan. Every miss emitted the WARN triggering the marker, even though all misses recovered within one cycle.
L1 tests added (fragmentcollector_hls suite):
Generated with Devin