-
Notifications
You must be signed in to change notification settings - Fork 774
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
[21036] Handle errors when setting socket buffer sizes (backport #4760) #4795
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cherry-pick of 139011d has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
13 tasks
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>
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>
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>
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>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany
force-pushed
the
mergify/bp/2.10.x/pr-4760
branch
from
May 16, 2024 15:12
abc2662
to
267c6e2
Compare
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
MiguelCompany
requested review from
MiguelCompany
and removed request for
MiguelCompany
May 16, 2024 15:25
MiguelCompany
force-pushed
the
mergify/bp/2.10.x/pr-4760
branch
from
May 16, 2024 16:08
2a54f07
to
fd8a041
Compare
Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
MiguelCompany
requested review from
MiguelCompany
and removed request for
MiguelCompany
May 16, 2024 16:10
10 tasks
@richiprosima Please test windows |
MiguelCompany
changed the title
[20976] Handle errors when setting socket buffer sizes (backport #4760)
[21036] Handle errors when setting socket buffer sizes (backport #4760)
May 17, 2024
@richiprosima Please test mac |
1 similar comment
@richiprosima Please test mac |
EduPonz
approved these changes
May 17, 2024
@Mergifyio backport 2.6.x |
✅ Backports have been created
|
mergify bot
added a commit
that referenced
this pull request
May 22, 2024
* Refs #20972. Move code into new private methods. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_send_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_receive_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check user configuration at the beginning of init method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Use maxMessageSize as minimum possible value. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add helper header with template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods return boolean. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods use new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. OpenAndBindUnicastOutputSocket uses new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Changes in OpenAndBindInputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972.Setting options on TCP channels. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Doxygen. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check limits of configured sizes. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add UDP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add TCP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Move checks in TCP to beginning of init. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in UDP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in TCP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove unused constants in UDP tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check final configuration on unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Less strict tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove `s_minimumSocketBuffer` from tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Deprecate `s_minimumSocketBuffer`. 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> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 532acfa) # Conflicts: # src/cpp/rtps/transport/TCPTransportInterface.cpp # src/cpp/rtps/transport/UDPTransportInterface.cpp # src/cpp/rtps/transport/UDPv4Transport.cpp # test/unittest/transport/TCPv6Tests.cpp # test/unittest/transport/UDPv4Tests.cpp # test/unittest/transport/UDPv6Tests.cpp
Merged
13 tasks
MiguelCompany
pushed a commit
that referenced
this pull request
Jun 26, 2024
* Refs #20972. Move code into new private methods. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_send_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_receive_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check user configuration at the beginning of init method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Use maxMessageSize as minimum possible value. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add helper header with template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods return boolean. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods use new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. OpenAndBindUnicastOutputSocket uses new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Changes in OpenAndBindInputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972.Setting options on TCP channels. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Doxygen. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check limits of configured sizes. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add UDP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add TCP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Move checks in TCP to beginning of init. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in UDP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in TCP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove unused constants in UDP tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check final configuration on unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Less strict tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove `s_minimumSocketBuffer` from tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Deprecate `s_minimumSocketBuffer`. 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> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 532acfa)
EduPonz
pushed a commit
that referenced
this pull request
Jun 27, 2024
* Handle errors when setting socket buffer sizes (#4760) (#4795) * Refs #20972. Move code into new private methods. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_send_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_receive_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check user configuration at the beginning of init method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Use maxMessageSize as minimum possible value. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add helper header with template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods return boolean. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods use new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. OpenAndBindUnicastOutputSocket uses new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Changes in OpenAndBindInputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972.Setting options on TCP channels. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Doxygen. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check limits of configured sizes. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add UDP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add TCP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Move checks in TCP to beginning of init. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in UDP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in TCP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove unused constants in UDP tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check final configuration on unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Less strict tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove `s_minimumSocketBuffer` from tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Deprecate `s_minimumSocketBuffer`. 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> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 532acfa) * Fix conflicts Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
EduPonz
pushed a commit
that referenced
this pull request
Jun 28, 2024
… samples (#4187) (#4607) * Handle errors when setting socket buffer sizes (#4760) (#4795) * Refs #20972. Move code into new private methods. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_send_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor on configure_receive_buffer_size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check user configuration at the beginning of init method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Use maxMessageSize as minimum possible value. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add helper header with template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods return boolean. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Configure methods use new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. OpenAndBindUnicastOutputSocket uses new template method. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Changes in OpenAndBindInputSocket. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972.Setting options on TCP channels. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Doxygen. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check limits of configured sizes. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add UDP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Add TCP unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Move checks in TCP to beginning of init. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in UDP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Refactor for common code in TCP. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove unused constants in UDP tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Check final configuration on unit tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Less strict tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Remove `s_minimumSocketBuffer` from tests. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20972. Deprecate `s_minimumSocketBuffer`. 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> Co-authored-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 532acfa) * Fix conflicts Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Fix on_sample_lost notification on best-effort readers for fragmented samples (#4187) * Refs #20162. Regression test. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20162. Notify sample lost when dropping fragmented change. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20167. Linters. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20162. Apply suggestions. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20162. Use constexpr for buffer size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20162. Lower buffer size. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20351. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> (cherry picked from commit 5ac198e) * Make sample_lost_be_dw_be_dr_fragments test less flaky (#4620) * Refs #20692. Make sample_lost_be_dw_be_dr_fragments test less flakey. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Refs #20692. Uncrustify. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> * Improve test. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Note for backports:
s_minimumSocketBuffer
should be deprecated.Before this PR, setting too high a value for
sendBufferSize
orreceiveBufferSize
in a transport descriptor could lead to an error setting the buffer sizes. This error was silently discarded.The changes try to set the configured buffer size, halving it on an error until it gets the minimum allowed value (i.e. maxMessageSize).
@Mergifyio backport 2.10.x
Note: Since modifications need to be made on the backport, and the next patch release is 2.10.4, we will first
backport to 2.10.x, perform the modifications there, and then port to other supported branches.
Contributor Checklist
versions.md
file (if applicable).Reviewer Checklist
This is an automatic backport of pull request #4760 done by [Mergify](https://mergify.com).