-
Notifications
You must be signed in to change notification settings - Fork 803
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
[16608] Fix total_unread_ consistent with reader's history upon get_first_untaken_info() #3203
Conversation
Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
@richiprosima please test this |
Signed-off-by: Mario Dominguez <[email protected]>
Signed-off-by: Mario Dominguez <[email protected]>
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
@richiprosima Please test this |
Signed-off-by: Mario Dominguez <[email protected]>
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.
👍
@richiprosima Please test this |
@Mergifyio backport 2.8.x 2.7.x 2.6.x |
✅ Backports have been created
|
{ | ||
return v == change; | ||
}); | ||
auto item = instance_changes.cbegin(); |
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.
this item could be NULL? see ros2/rmw_fastrtps#659
…first_untaken_info (#3203)" This reverts commit de5cd9c. Signed-off-by: Tomoya Fujita <[email protected]>
…first_untaken_info (#3203)" (#3221) This reverts commit de5cd9c. Signed-off-by: Tomoya Fujita <[email protected]> Signed-off-by: Tomoya Fujita <[email protected]>
…taken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]>
…taken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) # Conflicts: # test/blackbox/api/dds-pim/PubSubReader.hpp
…taken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]>
…taken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) Signed-off-by: Mario Dominguez <[email protected]>
…taken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) Signed-off-by: Mario Dominguez <[email protected]>
…taken_info (#3223) * Fix total_unread_ consistent with reader's history after get_first_untaken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608. Reversed unnecessary changes on DDSBlackboxTestsBasic Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Not using shared pointer for PubSubReader and PubSubWriter. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved test. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved solution. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Fix linters. Signed-off-by: Miguel Company <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Mario Domínguez López <[email protected]>
…aken_info() (#3219) * Fix total_unread_ consistent with reader's history after get_first_untaken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) # Conflicts: # test/blackbox/api/dds-pim/PubSubReader.hpp * Refs #16608. Reversed unnecessary changes on DDSBlackboxTestsBasic Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Not using shared pointer for PubSubReader and PubSubWriter. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved test. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved solution. Signed-off-by: Miguel Company <[email protected]> * Linter && Removed conflict marks Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Miguel Company <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> Co-authored-by: Mario Domínguez López <[email protected]> Co-authored-by: Miguel Company <[email protected]> Co-authored-by: Mario Dominguez <[email protected]>
…aken_info() (#3218) * Fix total_unread_ consistent with reader's history after get_first_untaken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) Signed-off-by: Mario Dominguez <[email protected]> * Removed conflicts Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608. Reversed unnecessary changes on DDSBlackboxTestsBasic Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Not using shared pointer for PubSubReader and PubSubWriter. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved test. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved solution. Signed-off-by: Miguel Company <[email protected]> * Linter Signed-off-by: Mario Dominguez <[email protected]> * Removed Multithreaded test from DDSBlackBoxTestsBasic Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Mario Domínguez López <[email protected]> Co-authored-by: Mario Dominguez <[email protected]> Co-authored-by: Miguel Company <[email protected]>
…aken_info() (#3217) * Fix total_unread_ consistent with reader's history after get_first_untaken_info (#3203) * Refs 16608: Added BlackBoxTest Signed-off-by: Mario Dominguez <[email protected]> * Refs 16608: Fix. Make get_first_untaken_info() a read-only API call Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Fix tsan warning Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Applied second-reviewed suggested changes Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608: Skip test for Data-Sharing Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> (cherry picked from commit de5cd9c) Signed-off-by: Mario Dominguez <[email protected]> * Resolved conflicts Signed-off-by: Mario Dominguez <[email protected]> * Refs #16608. Reversed unnecessary changes on DDSBlackboxTestsBasic Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Not using shared pointer for PubSubReader and PubSubWriter. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved test. Signed-off-by: Miguel Company <[email protected]> * Refs #16608. Improved solution. Signed-off-by: Miguel Company <[email protected]> * Linter Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Mario Domínguez López <[email protected]> Co-authored-by: Mario Dominguez <[email protected]> Co-authored-by: Miguel Company <[email protected]>
Description
mp_reader->nextUntakenCache()
inget_first_untaken_info()
is removing the change (it->remove_change()
) ifmatched_writer_lookup()
returns false. This, in turn callschange_removed_by_history()
butget_last_notified()
returns always false in that case because no writerGUID is found, hence a sequence number of 0.0 is returned.This situation causes that
total_unread_
is not decremented despite removing the change, so the history size andtotal_unread_
variable are inconsistent and the issue arises.When user calls
take_next_sample()
,Ret::NO_DATA
is returned despitereader->get_unread_count()
is different from 0.Proposed solution
get_first_untaken_info()
should be a read-only API andmp_reader->nextUntakenCache()
should not be called from inside because it modifies the history in certain cases.@Mergifyio backport 2.8.x 2.7.x 2.6.x
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist