Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce GID storage to 16 bytes. #345

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

clalancette
Copy link
Contributor

That is, the size of an RMW GID should be defined by the RMW
layer and the RMW implementations should conform to it. With
that said, 16 bytes is plenty (and happens to match the size
of a GUID in DDS, which is also 16 bytes). So reduce this
to 16 bytes.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

Note that this is a rehash of #328, but I think we have sufficient evidence now that this always should have been 16 bytes. This will also require a PR in rmw_dds_common, which is coming up next.

That is, the size of an RMW GID should be defined by the RMW
layer and the RMW implementations should conform to it.  With
that said, 16 bytes is plenty (and happens to match the size
of a GUID in DDS, which is also 16 bytes).  So reduce this
to 16 bytes.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

clalancette commented Jan 19, 2023

Full CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status
  • RHEL Build Status

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@clalancette
Copy link
Contributor Author

This is approved, and CI is clean. I'm going to go ahead and merge this (and the corresponding rmw_dds_common PR). Thanks for the review.

@clalancette clalancette merged commit 8995d9f into rolling Jan 23, 2023
@delete-merged-branch delete-merged-branch bot deleted the clalancette/reduce-gid-storage-to16bytes branch January 23, 2023 18:11
christophebedard added a commit to ros2/ros2_tracing that referenced this pull request Oct 7, 2024
The size changed from 24 to 16 bytes in ros2/rmw#345. The same size is
defined in `tracetools`, and it was never updated.

In practice, reading 24-16=8 random extra bytes didn't change much,
since nothing is currently relying on the GID values, at least not
relying on getting the same GID for the same object from two different
systems, because it doesn't work with `rmw_cyclonedds`, see
ros2/rmw_cyclonedds#377.

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
christophebedard added a commit to ros2/ros2_tracing that referenced this pull request Oct 8, 2024
The size changed from 24 to 16 bytes in ros2/rmw#345. The same size is
defined in `tracetools`, and it was never updated.

In practice, reading 24-16=8 random extra bytes didn't change much,
since nothing is currently relying on the GID values, at least not
relying on getting the same GID for the same object from two different
systems, because it doesn't work with `rmw_cyclonedds`, see
ros2/rmw_cyclonedds#377.

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants