Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

Throw BagException when disk is full#1451

Merged
dirk-thomas merged 2 commits intomelodic-develfrom
unknown repository
Aug 3, 2018
Merged

Throw BagException when disk is full#1451
dirk-thomas merged 2 commits intomelodic-develfrom
unknown repository

Conversation

@VictorLamoine
Copy link
Copy Markdown
Contributor

Currently when the disk is full a ROS_ERROR message is sent, writing is disabled (see https://github.com/ros/ros_comm/blob/melodic-devel/tools/rosbag/src/recorder.cpp#L649-L651). The problem is that the recording thread does not exit in that case.

This changes the behavior:

  • If disk is below the minimum an exception is thrown
  • The exception is catched in the recording thread
  • The recording thread exits with an error code (1)
  • The run member functions joins the recording thread and return the exit code

From a user perspective now you can run:

if (!recorder->run())
  // Handle the fact that we cannot record anymore

Note: in doRecordSnapshotter no disk space checking is done, I did not add it.

@dirk-thomas
Copy link
Copy Markdown
Member

@ros-pull-request-builder retest this please

@dirk-thomas
Copy link
Copy Markdown
Member

The failing test is known to be flaky. I will go ahead and merge this.

Thank you for the improvement!

@dirk-thomas dirk-thomas merged commit 8ec1dcd into ros:melodic-devel Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants