Repository navigation
fix: move history_memory_policy outside leave_middleware_default_qos guard - #896
Functionhx wants to merge 1 commit into
Conversation
When data_sharing is AUTOMATIC (default), the history_memory_policy was only set to PREALLOCATED_WITH_REALLOC_MEMORY_MODE inside the block gated by leave_middleware_default_qos. This meant users with default QoS settings could hit NotEnoughMemoryException when the preallocated pool was exhausted, because the policy was left at PREALLOCATED_MEMORY_MODE. Move the assignment outside the conditional so it always applies. Test plan: built and verified NotEnoughMemoryException no longer occurs with default data_sharing AUTOMATIC configuration. Signed-off-by: Functionhx <2994114386@qq.com>
|
Tick the box to add this pull request to the merge queue (same as
|
|
Converted to draft. The current approach needs design discussion — unconditionally overriding XML-configured history_memory_policy conflicts with documented behavior. Will narrow scope to internal discovery endpoints only, or discuss correct approach with maintainers. |
|
@Functionhx As you said, the behavior is currently documented here. I agree that we may apply some custom logic for In my honest opinion, if the user wants to enable datasharing, it should be done on specific topics, not as a default profile. |
|
@Functionhx I see the default value changed in Fast DDS (see eProsima/Fast-DDS#3108) long ago. Since the only ROS 2 distribution affected by #878 is humble, this PR should target humble instead of rolling. |
Prevent NotEnoughMemoryException crash when RMW_FASTRTPS_USE_QOS_FROM_XML=1 with data_sharing. Move history_memory_policy to always apply PREALLOCATED_WITH_REALLOC. Fixes #878.