Skip to content

Fix default history depth in examples - #6534

Open
raulojeda22 wants to merge 1 commit into
masterfrom
fix/examples-depth
Open

raulojeda22 wants to merge 1 commit into
masterfrom
fix/examples-depth

Conversation

@raulojeda22

@raulojeda22 raulojeda22 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Description

We used to have a default limit in max_samples_per_instance of 400, until this PR changed it to 0 (unlimited): #6261

These examples used that value to set the depth if the param -s was not set (samples), so with default values, just a publisher and a subscriber, the example failed with this error:

2026-08-10 14:18:19.050 [RTPS_QOS_CHECK Error] HISTORY DEPTH must be higher than 0 if HISTORY KIND is KEEP_LAST. -> Function check_qos
2026-08-10 14:18:19.050 [app_name Error] DataWriter initialization failed -> Function main

This PR fixes this issue by adding a constant with a default depth to the examples for when the samples parameter is not set.

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • N/A Any new/modified methods have been properly documented using Doxygen.
  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)
  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.
  • Changes are API compatible.
  • N/A New feature has been added to the versions.md file (if applicable).
  • N/A New feature has been documented/Current behavior is correctly described in the documentation.
  • N/A Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • If this is a critical bug fix, backports to the critical-only supported branches have been requested.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

Signed-off-by: Raül Ojeda Gandia <raulojeda@eprosima.com>
@raulojeda22 raulojeda22 added this to the v3.6.3.0 milestone Sep 14, 2026
@github-actions github-actions Bot added the ci-pending PR which CI is running label Sep 14, 2026

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

ci-pending PR which CI is running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant