perf: remove useless stat checking logic#11178
perf: remove useless stat checking logic#11178zhengkunwang223 merged 2 commits into1Panel-dev:dev-v2from
Conversation
* Add a timeout to the dialer for Unix socket connections * Improve error response by including the error message in the "Bad Gateway" response
* Update sockPath to a constant SockPath for improved clarity and consistency * Ensure the new constant is used in the dialer function for Unix socket connections
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What this PR does / why we need it?
每一个请求都stat一遍有点太浪费了,而且没有必要。
Summary of your change
移除os.stat,换成超时 dial 逻辑,超时即报 502 错误。测试 agent 挂掉时这个新逻辑不影响 core,agent再启动也没有影响
Please indicate you've done the following: