Skip to content

Add exponential NeedMediaData resend back-off on notification failure#471

Open
smudri85 wants to merge 3 commits into
masterfrom
feature/RDKEMW-15485
Open

Add exponential NeedMediaData resend back-off on notification failure#471
smudri85 wants to merge 3 commits into
masterfrom
feature/RDKEMW-15485

Conversation

@smudri85
Copy link
Copy Markdown
Contributor

@smudri85 smudri85 commented Apr 6, 2026

Summary: Add exponential NeedMediaData resend back-off on notification failure.
Type: Feature
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-15485

Sasa Mudri added 2 commits April 6, 2026 01:51
Summary: Added backoff to scheduleNotifyNeedMediaData() timer creation at error.
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-15485
Copilot AI review requested due to automatic review settings April 6, 2026 00:31
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Pull request must be merged with a description containing the required fields,

Summary:
Type: Feature/Fix/Cleanup
Test Plan:
Jira:

If there is no jira releated to this change, please put 'Jira: NO-JIRA'.

Description can be changed by editing the top comment on your pull request and making a new commit.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds exponential back-off when rescheduling NeedMediaData notifications after a send failure, and ensures the back-off resets on success and on source lifecycle events (flush/remove), improving resilience and avoiding tight retry loops in failure scenarios.

Changes:

  • Introduce per-MediaSourceType resend delay back-off with exponential growth capped at a max, applied when notifyNeedMediaDataInternal() fails.
  • Reset back-off on successful notification, flush(), and removeSource().
  • Add/extend unit tests validating doubling behavior and reset behavior after success/flush/remove.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
media/server/main/source/MediaPipelineServerInternal.cpp Implements back-off tracking and applies it to scheduleNotifyNeedMediaData; resets state on success/flush/remove.
media/server/main/include/MediaPipelineServerInternal.h Declares back-off storage and helper methods.
tests/unittests/media/server/main/mediaPipeline/HaveDataTest.cpp Adds UT for back-off doubling on failures and reset after success.
tests/unittests/media/server/main/mediaPipeline/FlushTest.cpp Adds UT verifying flush resets the resend back-off.
tests/unittests/media/server/main/mediaPipeline/SourceTest.cpp Adds UT verifying removeSource resets the resend back-off.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread media/server/main/source/MediaPipelineServerInternal.cpp Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.4%
Functions coverage stays unchanged and is: 92.5%

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.4%
Functions coverage stays unchanged and is: 92.5%

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.

2 participants