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

[jazzy] Bugfix for writer not being able to open again after closing (backport #1599) #1639

Merged
merged 1 commit into from
May 9, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 6, 2024

* re-applies fixes from #1590 to rolling. Also removes new message definition in sequential writer test for multiple open operations. Also clears topic_names_to_message_definitions_ and handles message_definitions_s underlying container similarly. Lastly, also avoids reset of factory in the compression writer, adds unit test there too.

Signed-off-by: Yannick Schulz <yschulz854@gmail.com>

* removes unused compressor_ member from compresser writer class. Also delegates rest of the closing behavior to the base class in close method, as it is handled in the open and write methods of the compression writer

Signed-off-by: Yannick Schulz <yschulz854@gmail.com>

* Remove unrelated delta

- message_definitions_ was intentionally allocated on the stack and
should persist between writer close() and open() because it represents
cache for message definitions which is not changes.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Don't call virtual methods from destructors

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Cleanup 'rosbag2_directory_next' after the test run

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Protect Writer::open(..) and Writer::close() with mutex on upper level

- Rationale: To avoid race conditions if open(..) and close() could be
ever be called from different threads.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Bugfix for WRITE_SPLIT callback not called for the last compressed file

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Bugfix for lost messages from cache when closing compression writer

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

* Use dedicated is_open_ flag instead of relying on storage_

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Yannick Schulz <yschulz854@gmail.com>
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Michael Orlov <michael.orlov@apex.ai>
(cherry picked from commit 20cfc02)
@mergify mergify bot requested a review from a team as a code owner May 6, 2024 22:01
@mergify mergify bot requested review from MichaelOrlov and james-rms and removed request for a team May 6, 2024 22:01
@MichaelOrlov MichaelOrlov changed the title Bugfix for writer not being able to open again after closing (backport #1599) [jazzy] Bugfix for writer not being able to open again after closing (backport #1599) May 6, 2024
Copy link
Contributor

@MichaelOrlov MichaelOrlov left a comment

Choose a reason for hiding this comment

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

@clalancette Don't you mind to merge this bugfix to Jazzy?
It has ABI incompatible changes by adding a new private member
std::atomic_bool is_open_{false};
to the rosbag2_cpp::SequantialWriter class.

@MichaelOrlov
Copy link
Contributor

@marcoag Are you ok with merging this bugfix to Jazzy now?

@marcoag
Copy link
Contributor

marcoag commented May 8, 2024

@marcoag Are you ok with merging this bugfix to Jazzy now?

Since it's a bugfix I'm ok with the merge into jazzy but let's wait for @clalancette's input on it.

@MichaelOrlov
Copy link
Contributor

Pulls: #1639
Gist: https://gist.githubusercontent.com/MichaelOrlov/2665ae9d9455275b759d452af57fc9cc/raw/1ea05753580825b0852d0dd131ebf6b75eef8e81/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_cpp rosbag2_compression rosbag2_tests
TEST args: --packages-above rosbag2_cpp rosbag2_compression rosbag2_tests
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/13853

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

@MichaelOrlov MichaelOrlov merged commit 7911183 into jazzy May 9, 2024
14 checks passed
@delete-merged-branch delete-merged-branch bot deleted the mergify/bp/jazzy/pr-1599 branch May 9, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants