fix: move history_memory_policy outside leave_middleware_default_qos guard - #896
Draft
Functionhx wants to merge 1 commit into
Draft
fix: move history_memory_policy outside leave_middleware_default_qos guard#896Functionhx wants to merge 1 commit into
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
|
Functionhx
marked this pull request as draft
July 12, 2026 04:24
Author
|
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. |
Collaborator
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.