-
Notifications
You must be signed in to change notification settings - Fork 883
[22814] Improve DS routines #5764
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
Conversation
f2e1bb7 to
f88e09d
Compare
39c54a8 to
35784d6
Compare
Mario-DL
left a comment
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.
The approach looks good to me.
Apart from the suggestions below it would be nice if we could add a test. We can make use of test_UDPTransport to detect that the Data(P,W,R) are only sent one time.
src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.hpp
Show resolved
Hide resolved
src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: cferreiragonz <[email protected]>
35784d6 to
b6ff33d
Compare
Signed-off-by: cferreiragonz <[email protected]>
Signed-off-by: cferreiragonz <[email protected]>
Signed-off-by: cferreiragonz <[email protected]>
Signed-off-by: cferreiragonz <[email protected]>
b6ff33d to
f3ab8d3
Compare
|
In spite of the changes requested, I have added as first two commits the tests to check each scenario solved by this PR. |
Signed-off-by: cferreiragonz <[email protected]>
Mario-DL
left a comment
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,
Please double check the contributor checklist. I think we could backport this improvement
|
@Mergifyio backport 3.1.x 2.14.x 2.10.x |
✅ Backports have been createdDetails
|
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> (cherry picked from commit 0fa7b1e)
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> (cherry picked from commit 0fa7b1e) # Conflicts: # src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.cpp # src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.hpp # src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.cpp # src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.hpp # src/cpp/rtps/builtin/discovery/database/DiscoverySharedInfo.hpp # src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> (cherry picked from commit 0fa7b1e) # Conflicts: # src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.cpp # src/cpp/rtps/builtin/discovery/database/DiscoveryDataBase.hpp # src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.cpp # src/cpp/rtps/builtin/discovery/database/DiscoveryParticipantsAckStatus.hpp # src/cpp/rtps/builtin/discovery/database/DiscoverySharedInfo.hpp # src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp # test/blackbox/common/BlackboxTestsDiscovery.cpp
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> (cherry picked from commit 0fa7b1e)
* Improve DS routines (#5764) * Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> (cherry picked from commit 0fa7b1e) * Fix pdata guid access to 3.1.x Signed-off-by: Mario Dominguez <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> Signed-off-by: Mario Dominguez <[email protected]> Co-authored-by: Carlos Ferreira González <[email protected]> Co-authored-by: Mario Dominguez <[email protected]>
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> Signed-off-by: Eugenio Collado <[email protected]>
* Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> Signed-off-by: Eugenio Collado <[email protected]>
* Improve DS routines (#5764) * Refs #22814: Data(p) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Data(r/w) test Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Tristate for ParticipantsAckStatus Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Send direct messages to new clients Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Review - Changes Signed-off-by: cferreiragonz <[email protected]> * Refs #22814: Uncrustify Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> Signed-off-by: Eugenio Collado <[email protected]> * Fix tests compilation Signed-off-by: Eugenio Collado <[email protected]> * Add GUID prefix and builtin data filter Signed-off-by: cferreiragonz <[email protected]> * Avoid using parametrized test struct Signed-off-by: cferreiragonz <[email protected]> * Move test to DDS suite Signed-off-by: cferreiragonz <[email protected]> --------- Signed-off-by: cferreiragonz <[email protected]> Signed-off-by: Eugenio Collado <[email protected]> Co-authored-by: Carlos Ferreira González <[email protected]> Co-authored-by: Eugenio Collado <[email protected]>
Description
This PR aims to improve efficiency of DS routines by reducing the number of messages sent (Data(p), Data(r) and Data(w)). It does so by:
pdp_queue(when a new client is discovered). Now a direct message to the new discovered client is sent instead of adding the server's Data(p) to the queue, which led to multiple sends to all direct clients.DiscoveryParticipantsAckStatusinstead of just a boolean. In this way the Discovery DB avoids re-sending repeated data when processing topics.Related PR:
@Mergifyio backport 3.1.x 2.14.x 2.10.x
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist