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

Add update_metadata(BagMetadata) API for storage plugin interface #1149

Merged

Conversation

MichaelOrlov
Copy link
Contributor

@MichaelOrlov MichaelOrlov commented Nov 6, 2022

Relates:

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

- We need update_metadata(BagMetadata) API to be able to save
BagMetadata inside each bag file, directly in SQLite DB or MCAP file.
- update_metadata(BagMetadata) calling ones after creating storage
object and second time just before destructing it.

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
@MichaelOrlov MichaelOrlov changed the title Add update_metadata(BagMetadata) for storage plugins interface Add update_metadata(BagMetadata) API for storage plugins interface Nov 6, 2022
@MichaelOrlov MichaelOrlov changed the title Add update_metadata(BagMetadata) API for storage plugins interface Add update_metadata(BagMetadata) API for storage plugin interface Nov 6, 2022
- Check for `storage_` is not nullptr since it could be called from
destructor
- Add `storage_->update_metadata(metadata_)` in
`SequentialCompressionWriter::close()`

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
- Test that storage->update_metadata() called on writer open and during
writer destruction.
- Test that storage->update_metadata() calling with appropriate
parameters when calling `bag_split()`

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
- Test that storage->update_metadata() called on writer open and during
writer destruction.
- Test that storage->update_metadata() calling with appropriate
parameters when calling `bag_split()`

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
@MichaelOrlov MichaelOrlov force-pushed the morlov/add-update_metadata-api-for-storage-plugins branch from a67be0d to 6f18793 Compare November 8, 2022 02:03
@MichaelOrlov MichaelOrlov marked this pull request as ready for review November 8, 2022 02:10
@MichaelOrlov MichaelOrlov requested a review from a team as a code owner November 8, 2022 02:10
@MichaelOrlov MichaelOrlov requested review from emersonknapp and jhdcs and removed request for a team November 8, 2022 02:10
Copy link
Contributor

@jhdcs jhdcs left a comment

Choose a reason for hiding this comment

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

This looks good to me.

@MichaelOrlov
Copy link
Contributor Author

Gist: https://gist.githubusercontent.com/MichaelOrlov/e5b179b77a8b80102736bf330fa8fa3f/raw/ee348d57a834af87ed47ffd16a48fc6a75ec5de1/ros2.repos
BUILD args: --packages-above-and-dependencies rosbag2_compression rosbag2_cpp rosbag2_storage rosbag2_storage_sqlite3 rosbag2_tests
TEST args: --packages-above rosbag2_compression rosbag2_cpp rosbag2_storage rosbag2_storage_sqlite3 rosbag2_tests
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11163

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

@MichaelOrlov
Copy link
Contributor Author

MichaelOrlov commented Nov 22, 2022

Re-run CI after rebasing and fixing merge conflicts
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/11166

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

@MichaelOrlov MichaelOrlov merged commit 86efa58 into rolling Nov 23, 2022
@delete-merged-branch delete-merged-branch bot deleted the morlov/add-update_metadata-api-for-storage-plugins branch November 23, 2022 01:05
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.

None yet

2 participants