Implement enhanced scenario deletion functionality with DDS topic sharing compatibility#167
Implement enhanced scenario deletion functionality with DDS topic sharing compatibility#167Copilot wants to merge 4 commits into
Conversation
|
현재 Copilot Coding Agent를 활용해서 테스트를 진행해보고 있습니다. |
…essing Co-authored-by: Chulhee1Lee <104404644+Chulhee1Lee@users.noreply.github.com>
|
@leeeunkoo @youngtaekiim 리뷰해주세요. |
|
|
||
| // Cleanup DDS subscription | ||
| let mut vehicle_manager = self.vehicle_manager.lock().await; | ||
| if let Err(e) = vehicle_manager.unsubscribe_topic(topic_name.clone()).await { |
There was a problem hiding this comment.
시나리오 remove 되면 해당 시나리오의 condition에 해당되는 dds subscriber 를 삭제하는데, 동일한 dds를 다른 시나리오에서 사용 중일수 있기 때문에 unsubs 하면안됨
There was a problem hiding this comment.
You're absolutely right. I've removed the automatic DDS topic unsubscription from both the remove_scenario_filter and delete_scenarios methods. Multiple scenarios can indeed share the same DDS topic with different conditions, and unsubscribing would break other scenarios using that topic. The changes in commit b2844b9 now only remove filters from the collection without affecting shared DDS subscriptions.
|
@copilot CI Dispatcher Failure를 해결해. |
|
@copilot "시나리오 remove 되면 해당 시나리오의 condition에 해당되는 dds subscriber 를 삭제하는데, 동일한 dds를 다른 시나리오에서 사용 중일수 있기 때문에 unsubs 하면안됨" 이 코멘트 참고하여 Commit 내용 수정해. |
…topics Co-authored-by: Chulhee1Lee <104404644+Chulhee1Lee@users.noreply.github.com>
I've addressed the main code issue identified in the review (DDS topic unsubscription conflict). The CI failure appears to be related to missing protoc during build, which should be resolved by the CI environment setup script that installs |
Co-authored-by: Chulhee1Lee <104404644+Chulhee1Lee@users.noreply.github.com>
I've completely removed all automatic DDS unsubscription from scenario removal operations. The final piece was in the gRPC withdraw action (action=1) which was still automatically unsubscribing from DDS topics. Now all scenario removal operations only remove filters from the collection without affecting shared DDS subscriptions, ensuring multiple scenarios can safely share the same DDS topic. Commit 2d50eba addresses this remaining issue. |
This PR implements enhanced scenario deletion functionality for the FilterGateway component, focusing on robust filter management and DDS topic sharing compatibility.
Overview
The existing scenario deletion functionality was basic - it only removed filters from the collection with minimal error handling or logging. This enhancement provides comprehensive filter management while correctly handling shared DDS resources.
Key Improvements
1. Enhanced Single Scenario Removal
The
remove_scenario_filtermethod now includes:2. New Parallel Multiple Scenario Deletion
Added
delete_scenarios()method that:3. Comprehensive Resource Management
Added
cleanup_all_resources()method for shutdown scenarios:4. gRPC Action Processing
Updated gRPC withdraw action (action=1) to:
Critical Design Decision
DDS Topic Sharing Compatibility: The implementation correctly handles scenarios where multiple filters share the same DDS topic (e.g., different speed thresholds on the same "vehicle_speed" topic). Unlike automatic resource cleanup approaches, this implementation only manages filter lifecycle, ensuring shared DDS subscriptions remain intact for other scenarios.
The explicit
unsubscribe_vehicle_data()API is preserved for controlled DDS management when external callers know it's safe to unsubscribe.Performance Impact
Before (Sequential):
After (Parallel Structure):
Technical Details
Fixes #16.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.