Skip to content

RDKEMW-26492: Workstream B1 implementation of Coarselock proposal - #650

Open
trupthi1403 wants to merge 2 commits into
masterfrom
feature/RDKEMW-26492-dev
Open

trupthi1403 wants to merge 2 commits into
masterfrom
feature/RDKEMW-26492-dev

Conversation

@trupthi1403

Copy link
Copy Markdown
Contributor

RDKEMW-26492: Workstream B1 implementation of Coarselock proposal

Reason for change: splitting NeedData locks per source and reducing cross-source contention
Test Procedure: UT/CT, Fullstack

Copilot AI balanced review requested due to automatic review settings October 20, 2026 09:39
@github-actions

Copy link
Copy Markdown

Pull request title must follow the pattern:
< JIRA TICKET >: < one line summary of change less than 65 characters >

Pull request description must follow the Commit message format for RDK-E:
https://etwiki.sys.comcast.net/spaces/RDKAR/pages/1407997180/Commit+Message+Format+For+RDKE

  1. Associated JIRA ticket in format : < JIRA TICKET >: < one line summary of change less than 65 characters >
  2. Detailed reason for change information
  3. Test procedure. Only references links to Jira ticket or sub tickets where test steps and references are captured.

< JIRA TICKET >: < one line summary of change less than 65 characters >
< empty line >
Reason for change:
Test Procedure: < https://ccp.sys.comcast.net/browse/JIRA TICKET/url/to/test_step_section>

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rialto/650/rdkcentral/rialto

  • Commit: cfe175b

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A lock-order inversion can deadlock request processing, and notification insertion still introduces cross-source contention.

3 open issues
What changed in this PR

Implements Workstream B1 by splitting client NeedData locking by source type to reduce cross-source contention.

Changes:

  • Adds source-specific request buckets and shared routing metadata.
  • Uses shared locks for attached-source reads.
  • Adds a two-source request-routing test.
File Description
tests/​unittests/​media/​client/​main/​mediaPipeline/​DataTest.cpp Tests independent audio/video request routing.
media/​client/​main/​source/​MediaPipeline.cpp Implements request routing and per-source locking.
media/​client/​main/​source/​AttachedSources.cpp Separates read and write locking.
media/​client/​main/​include/​MediaPipeline.h Declares request buckets and locking helpers.
media/​client/​main/​include/​AttachedSources.h Changes source protection to a shared mutex.

Review effort: Balanced

Comment thread media/client/main/source/MediaPipeline.cpp Outdated
Comment thread media/client/main/source/MediaPipeline.cpp Outdated
Comment thread tests/unittests/media/client/main/mediaPipeline/DataTest.cpp
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Comment thread media/client/main/source/MediaPipeline.cpp Fixed
Copilot AI balanced review requested due to automatic review settings October 20, 2026 10:52
@github-actions

Copy link
Copy Markdown

tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: warning: Access of moved variable 'audioWriter'. [accessMoved]
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:33: note: Calling std::move(audioWriter)
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: note: Access of moved variable 'audioWriter'.
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rialto/650/rdkcentral/rialto

  • Commit: ba8d6b5

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread media/client/main/source/MediaPipeline.cpp
Comment thread tests/unittests/media/client/main/mediaPipeline/DataTest.cpp Outdated
Comment thread tests/unittests/media/client/main/mediaPipeline/DataTest.cpp
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 20, 2026 11:10
@trupthi1403
trupthi1403 force-pushed the feature/RDKEMW-26492-dev branch from ba8d6b5 to 2e44820 Compare October 20, 2026 11:10
@github-actions

Copy link
Copy Markdown

tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: warning: Access of moved variable 'audioWriter'. [accessMoved]
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:33: note: Calling std::move(audioWriter)
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: note: Access of moved variable 'audioWriter'.
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rialto/650/rdkcentral/rialto

  • Commit: 2e44820

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The concurrency test’s timeout cleanup can deadlock, and request insertion introduces busy-wait contention.

2 open issues
2 resolved since last review

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

Copilot AI balanced review requested due to automatic review settings October 20, 2026 11:35
@trupthi1403
trupthi1403 force-pushed the feature/RDKEMW-26492-dev branch from 2e44820 to 06797b4 Compare October 20, 2026 11:35
@github-actions

Copy link
Copy Markdown

tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: warning: Access of moved variable 'audioWriter'. [accessMoved]
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:33: note: Calling std::move(audioWriter)
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: note: Access of moved variable 'audioWriter'.
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rialto/650/rdkcentral/rialto

  • Commit: 06797b4

Report detail: gist'

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Contention handling and concurrency-test timeout handling still need correction.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 20, 2026 11:41
@trupthi1403
trupthi1403 force-pushed the feature/RDKEMW-26492-dev branch from 06797b4 to 8f55ac1 Compare October 20, 2026 11:41
@github-actions

Copy link
Copy Markdown

tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: warning: Access of moved variable 'audioWriter'. [accessMoved]
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:33: note: Calling std::move(audioWriter)
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: note: Access of moved variable 'audioWriter'.
.WillOnce(Return(ByMove(std::move(audioWriter))))
^
nofile:0:0: information: Active checkers: 161/592 (use --checkers-report= to see details) [checkersReport]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Multi-source shutdown synchronization needs regression coverage to protect against shared-memory teardown during active writes.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment on lines +800 to +802
std::unique_lock<std::mutex> audioLock{m_needDataRequests[0].mutex};
std::unique_lock<std::mutex> videoLock{m_needDataRequests[1].mutex};
std::unique_lock<std::mutex> subtitleLock{m_needDataRequests[2].mutex};
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 1 file pending identification.

  • Protex Server Path: /home/blackduck/github/rialto/650/rdkcentral/rialto

  • Commit: 8f55ac1

Report detail: gist'

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.5%
Functions coverage stays unchanged and is: 92.8%

@rdkcmf-jenkins

Copy link
Copy Markdown
Contributor

b'## WARNING: A Blackduck scan failure has been waived

A prior failure has been upvoted

  • Upvote reason: Not a real code match

  • Commit: 8f55ac1
    '

Copilot AI balanced review requested due to automatic review settings October 22, 2026 10:07
@trupthi1403
trupthi1403 force-pushed the feature/RDKEMW-26492-dev branch from 8f55ac1 to d0c5cf6 Compare October 22, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The reported lock-contention and concurrency-test reliability issues remain unresolved in the supplied changes.

1 open issue

Review effort: Balanced

Reason for change:  splitting NeedData locks per source and reducing cross-source contention

Test Procedure: Build and Verify
Priority: P0
Risks: Low
@trupthi1403
trupthi1403 force-pushed the feature/RDKEMW-26492-dev branch from d0c5cf6 to 6acc8ed Compare October 22, 2026 10:36

This branch has not been deployed

No deployments
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.

4 participants