-
Notifications
You must be signed in to change notification settings - Fork 255
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
Bugfix for bag_split event callbacks called to early with file compression #1643
Bugfix for bag_split event callbacks called to early with file compression #1643
Conversation
843ca1d
to
1d6249c
Compare
@MichaelOrlov do we have a reproducer for the problem that is fixed here? |
@r7vme Nop, that is the point. We need a regression test coverage to make sure that fix works as expected and that no one will brake it again. |
87d7ed8
to
1fab7dd
Compare
Signed-off-by: Michael Orlov <[email protected]>
- It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
- Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]>
Signed-off-by: Michael Orlov <[email protected]>
1fab7dd
to
5016a0d
Compare
I would appreciate a code review for this PR. |
@MichaelOrlov i will try to allocate some time in this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just a minor nitpick.
rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Orlov <[email protected]>
@ros-pull-request-builder retest this please |
Pulls: #1643 |
https://github.com/Mergifyio backport jazzy |
✅ Backports have been created
|
…ssion (#1643) * Bugfix for bag_split event callbacks not called with file compression Signed-off-by: Michael Orlov <[email protected]> * Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]> * Adjust "split_event_calls_callback" for testing multiple splits Signed-off-by: Michael Orlov <[email protected]> * Use temp folder for "SequentialWriterTest" fixture instead of "uri" Signed-off-by: Michael Orlov <[email protected]> * Add tests for split event callbacks when using file and msg compression - Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]> * Add debug info to the flaky "can_record_again_after_stop" test Signed-off-by: Michael Orlov <[email protected]> * Use `uint64_t` type for `fake_storage_size_` in tests Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 1877b53)
https://github.com/Mergifyio backport humble |
✅ Backports have been created
|
…ssion (#1643) * Bugfix for bag_split event callbacks not called with file compression Signed-off-by: Michael Orlov <[email protected]> * Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]> * Adjust "split_event_calls_callback" for testing multiple splits Signed-off-by: Michael Orlov <[email protected]> * Use temp folder for "SequentialWriterTest" fixture instead of "uri" Signed-off-by: Michael Orlov <[email protected]> * Add tests for split event callbacks when using file and msg compression - Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]> * Add debug info to the flaky "can_record_again_after_stop" test Signed-off-by: Michael Orlov <[email protected]> * Use `uint64_t` type for `fake_storage_size_` in tests Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 1877b53) # Conflicts: # rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp # rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp # rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp # rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp # rosbag2_transport/test/rosbag2_transport/test_record.cpp
…ssion (#1643) (#1732) * Bugfix for bag_split event callbacks not called with file compression Signed-off-by: Michael Orlov <[email protected]> * Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]> * Adjust "split_event_calls_callback" for testing multiple splits Signed-off-by: Michael Orlov <[email protected]> * Use temp folder for "SequentialWriterTest" fixture instead of "uri" Signed-off-by: Michael Orlov <[email protected]> * Add tests for split event callbacks when using file and msg compression - Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]> * Add debug info to the flaky "can_record_again_after_stop" test Signed-off-by: Michael Orlov <[email protected]> * Use `uint64_t` type for `fake_storage_size_` in tests Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 1877b53) Co-authored-by: Michael Orlov <[email protected]>
…ssion (#1643) * Bugfix for bag_split event callbacks not called with file compression Signed-off-by: Michael Orlov <[email protected]> * Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]> * Adjust "split_event_calls_callback" for testing multiple splits Signed-off-by: Michael Orlov <[email protected]> * Use temp folder for "SequentialWriterTest" fixture instead of "uri" Signed-off-by: Michael Orlov <[email protected]> * Add tests for split event callbacks when using file and msg compression - Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]> * Add debug info to the flaky "can_record_again_after_stop" test Signed-off-by: Michael Orlov <[email protected]> * Use `uint64_t` type for `fake_storage_size_` in tests Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 1877b53) # Conflicts: # rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp # rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp # rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp # rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp # rosbag2_transport/test/rosbag2_transport/test_record.cpp
…le compression (backport #1643) (#1733) * Bugfix for bag_split event callbacks called to early with file compression (#1643) * Bugfix for bag_split event callbacks not called with file compression Signed-off-by: Michael Orlov <[email protected]> * Delete redundant "should_split_bagfile" in compression_writer - It is a non-virtual method and doesn't call from the base class. Signed-off-by: Michael Orlov <[email protected]> * Adjust "split_event_calls_callback" for testing multiple splits Signed-off-by: Michael Orlov <[email protected]> * Use temp folder for "SequentialWriterTest" fixture instead of "uri" Signed-off-by: Michael Orlov <[email protected]> * Add tests for split event callbacks when using file and msg compression - Added "split_event_calls_callback_with_msg_compression" and "split_event_calls_callback_with_file_compression" uit tests Signed-off-by: Michael Orlov <[email protected]> * Add debug info to the flaky "can_record_again_after_stop" test Signed-off-by: Michael Orlov <[email protected]> * Use `uint64_t` type for `fake_storage_size_` in tests Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> (cherry picked from commit 1877b53) # Conflicts: # rosbag2_compression/src/rosbag2_compression/sequential_compression_writer.cpp # rosbag2_compression/test/rosbag2_compression/test_sequential_compression_writer.cpp # rosbag2_cpp/src/rosbag2_cpp/writers/sequential_writer.cpp # rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp # rosbag2_transport/test/rosbag2_transport/test_record.cpp * Address merge conflicts Signed-off-by: Michael Orlov <[email protected]> --------- Signed-off-by: Michael Orlov <[email protected]> Co-authored-by: Michael Orlov <[email protected]>
rosbag2_cpp::Writer
. i.e. callbacks calling when the bag file closes. However, the expected behavior is that callbacks are called when compression is finished and the original bag file is deleted.Update: Jun-06-2024 Added unit tests to cover changes.