Repository navigation
RDKEMW-26492: Workstream B1 implementation of Coarselock proposal - #650
trupthi1403 wants to merge 2 commits into
Conversation
|
Pull request title must follow the pattern: Pull request description must follow the Commit message format for RDK-E:
< JIRA TICKET >: < one line summary of change less than 65 characters > |
There was a problem hiding this comment.
🟡 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
|
Coverage statistics of your commit: |
|
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: warning: Access of moved variable 'audioWriter'. [accessMoved] |
|
Coverage statistics of your commit: |
ba8d6b5 to
2e44820
Compare
|
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:500:43: warning: Access of moved variable 'audioWriter'. [accessMoved] |
|
Coverage statistics of your commit: |
2e44820 to
06797b4
Compare
|
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: warning: Access of moved variable 'audioWriter'. [accessMoved] |
06797b4 to
8f55ac1
Compare
|
tests/unittests/media/client/main/mediaPipeline/DataTest.cpp:498:43: warning: Access of moved variable 'audioWriter'. [accessMoved] |
| 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}; |
|
Coverage statistics of your commit: |
|
Coverage statistics of your commit: |
|
b'## WARNING: A Blackduck scan failure has been waived A prior failure has been upvoted
|
8f55ac1 to
d0c5cf6
Compare
Reason for change: splitting NeedData locks per source and reducing cross-source contention Test Procedure: Build and Verify Priority: P0 Risks: Low
d0c5cf6 to
6acc8ed
Compare

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