Conversation
|
HTHou
approved these changes
May 22, 2026
luoluoyuyu
approved these changes
May 27, 2026
Member
luoluoyuyu
left a comment
There was a problem hiding this comment.
Review 总结
修复 Windows 上 PowerShell/CIM 报错刷屏并拖垮 metrics 的问题:
- 解析
System32\...\powershell.exe绝对路径 - 失败后退避 5 分钟重试
- 可注入
PowerShellExecutor便于单测
建议合入。
| List<String> result = new ArrayList<>(); | ||
| List<String> rawOutput = new ArrayList<>(); | ||
| Process process = null; | ||
| if (System.currentTimeMillis() < nextPowerShellRetryTime) { |
Member
There was a problem hiding this comment.
失败后退避期间直接 return Collections.emptyList(),磁盘指标会短暂缺失而非沿用上次值。
对监控这是可接受的(避免 error 风暴),但建议在 handlePowerShellFailure 的日志中保留 nextPowerShellRetryTime,便于运维确认是「主动退避」而非「磁盘消失」。
非阻塞,当前实现可合入。
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR has:
for an unfamiliar reader.
for code coverage.
Key changed/added classes (or packages if there are too many classes) in this PR