Skip to content

destroy request on error to avoid hanging sockets#1141

Open
benzekrimaha wants to merge 5 commits intodevelopment/1.3from
improvement/HD-4352-properly-close-sockets
Open

destroy request on error to avoid hanging sockets#1141
benzekrimaha wants to merge 5 commits intodevelopment/1.3from
improvement/HD-4352-properly-close-sockets

Conversation

@benzekrimaha
Copy link
Copy Markdown
Contributor

@benzekrimaha benzekrimaha commented Mar 16, 2026

On timeout or other errors the socket was left open; we now destroy the request so the socket is properly closed.
Issue: HD-4352

On timeout or other errors the socket was left open; destroy the
request so the socket is properly closed.
@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Mar 16, 2026

Hello benzekrimaha,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@benzekrimaha benzekrimaha changed the base branch from development/1 to development/1.3 March 16, 2026 07:58
@bert-e
Copy link
Copy Markdown
Contributor

bert-e commented Mar 16, 2026

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@scality scality deleted a comment from bert-e Mar 16, 2026
@benzekrimaha benzekrimaha marked this pull request as ready for review March 16, 2026 07:59
@benzekrimaha benzekrimaha requested review from a team, SylvainSenechal and maeldonn March 16, 2026 07:59
Issue: HD-4352
Copy link
Copy Markdown

@maeldonn maeldonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test that reproduces the original problem (socket left open on error) and verifies it is now fixed?

@SylvainSenechal
Copy link
Copy Markdown

Could you add a test that reproduces the original problem (socket left open on error) and verifies it is now fixed?

Yeah if you are able to add a little test that counts connections or something it's nice, but might be hard I don't know

@benzekrimaha benzekrimaha force-pushed the improvement/HD-4352-properly-close-sockets branch 2 times, most recently from ce87e45 to 9cc19c9 Compare March 23, 2026 16:16
Stub http.request to emit a synthetic error after response; assert
destroy() is invoked with the expected err.code.

Issue: HD-4352
@benzekrimaha benzekrimaha force-pushed the improvement/HD-4352-properly-close-sockets branch from 9cc19c9 to 7ab390a Compare March 23, 2026 16:16
Copy link
Copy Markdown

@maeldonn maeldonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If @SylvainSenechal comment is right, we're missing the most important test.

@benzekrimaha benzekrimaha force-pushed the improvement/HD-4352-properly-close-sockets branch from 9502b41 to d80775c Compare March 30, 2026 12:54
@benzekrimaha benzekrimaha requested a review from maeldonn March 30, 2026 12:54
Assert destroy call counts in post-response and stream-error paths to guard against double-destroy regressions.

Issue: HD-4352
@benzekrimaha benzekrimaha force-pushed the improvement/HD-4352-properly-close-sockets branch from 1df5dd9 to 6d878a0 Compare March 30, 2026 13:09
Copy link
Copy Markdown

@maeldonn maeldonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just two small comments/questions.

Unify destroy-capture stubs with optional post-response error injection to reduce duplication and keep tests clearer.

Issue: HD-4352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants