-
Notifications
You must be signed in to change notification settings - Fork 240
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
fix sequential reader rollover-to-next-file #839
Conversation
- has_next() - calls recursively until next message OR no next file found - read_next() - calls has_next() to ensure necessary rollovers are made Signed-off-by: Sonia Jin <diegothemuich@gmail.com>
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.
Nice fix
- has_next() - calls recursively until next message OR no next file found - read_next() - calls has_next() to ensure necessary rollovers are made Signed-off-by: Sonia Jin <diegothemuich@gmail.com> Signed-off-by: Cameron Miller <cammlle@amazon.com>
@emersonknapp @lihui815 I am sorry for my late response to this closed issue, but IMO it was not a real issue it was working as designed. We just didn't have Doxygen documentation for these API. void Player::enqueue_up_to_boundary(uint64_t boundary)
{
rosbag2_storage::SerializedBagMessageSharedPtr message;
for (size_t i = message_queue_.size_approx(); i < boundary; i++) {
if (!reader_->has_next()) {
break;
}
message = reader_->read_next();
message_queue_.enqueue(message);
}
} and this is only one place where we are calling it. I would suggest to revert this PR and add relevant Doxygen comment to the |
After some detailed consideration I will step back. Sorry for disturbing. |
- has_next() - calls recursively until next message OR no next file found - read_next() - calls has_next() to ensure necessary rollovers are made Signed-off-by: Sonia Jin <diegothemuich@gmail.com> Signed-off-by: Wojciech Jaworski <wojciech.jaworski@robotec.ai>
has_next()
- calls recursively until next message OR no next file foundread_next()
- callshas_next()
to ensure necessary rollovers are made if necessarySigned-off-by: Sonia Jin diegothemuich@gmail.com