-
Notifications
You must be signed in to change notification settings - Fork 791
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
Keep changes inside instances sorted by source timestamp [12421] #2182
Conversation
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@Mergifyio backport 2.3.x 2.2.x 2.1.x 2.0.x |
Command
|
@richiprosima Please test windows |
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.
Just some syntactic sugar suggestion, feel free to dismiss it if we want to go for a quick merge.
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
@richiprosima Please test linux |
* Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f)
* Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f)
* Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f) # Conflicts: # src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp # src/cpp/rtps/history/ReaderHistory.cpp
* Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f) # Conflicts: # include/fastdds/rtps/history/ReaderHistory.h # src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp # src/cpp/rtps/history/ReaderHistory.cpp # test/mock/rtps/ReaderHistory/fastdds/rtps/history/ReaderHistory.h
Command
|
* Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Signed-off-by: Samuel Wilhelmsson <samuel@halodi.com>
* Keep changes inside instances sorted by source timestamp (#2182) * Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f) # Conflicts: # src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp # src/cpp/rtps/history/ReaderHistory.cpp * Refs 12421. Fix conflicts after backport. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
* Keep changes inside instances sorted by source timestamp (#2182) * Refs 12419. Regression test. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. Added sorted_vector_insert utility method. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. ReaderHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12419. SubscriberHistory uses sorted_vector_insert. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Uncrustify. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Apply suggestions Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs 12421. Moved new template method to correct namespace. Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> (cherry picked from commit 38e8d0f) # Conflicts: # include/fastdds/rtps/history/ReaderHistory.h # src/cpp/fastrtps_deprecated/subscriber/SubscriberHistory.cpp # src/cpp/rtps/history/ReaderHistory.cpp # test/mock/rtps/ReaderHistory/fastdds/rtps/history/ReaderHistory.h * Refs 12421: fix backport conflicts Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> * Refs #12421: linters Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
On a reliable reader, when using a topic with keys, and changes arrive unordered, they are returned in the received order instead of the sequence number order.
This PR fixes this misbehavior, and also adds a generic utility function to keep changes on a vector sorted.