-
-
Notifications
You must be signed in to change notification settings - Fork 181
perf(vacuum-filter): 优化 has 热路径(降低 API Key 负向短路成本) #757
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
abb57dd
perf(vacuum-filter): 优化 has 热路径(编码/哈希/取模)
tesgth032 c990f61
chore: format code (perf-vacuum-filter-has-61c0d01)
github-actions[bot] 01c3036
fix(vacuum-filter): 修复 scratch32 对齐崩溃并补齐测试
tesgth032 1744925
chore: format code (perf-vacuum-filter-has-201cf12)
github-actions[bot] cb0b029
test(bench): 添加 VacuumFilter.has microbench(默认跳过)
tesgth032 2563ea8
chore: format code (perf-vacuum-filter-has-81b8ca6)
github-actions[bot] ac320d4
perf(vacuum-filter): 明确 fast-reduce 截断并补齐索引不越界测试
tesgth032 8217561
chore: format code (perf-vacuum-filter-has-cd12943)
github-actions[bot] 4e5bbeb
fix(vacuum-filter): 通过 CI lint 并澄清 fast-reduce 截断语义
tesgth032 de19ef8
test(circuit): 修复 endpoint 告警用例串台导致的 flake
tesgth032 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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
indexTagmethod has a critical vulnerability: it can throw aRangeErrorwhen creating aUint32Arrayif thescratchbuffer's length is not a multiple of 4. This can lead to a Denial of Service (DoS) when processing specific input lengths. This issue occurs within a duplicated code block for resizing thescratchbuffer and recreating thescratch32view. The proposed fix addresses the alignment issue, and extracting this logic into a helper method (e.g.,resizeScratch(minSize: number)) would further improve maintainability and prevent future occurrences of this vulnerability due to duplicated code.