-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[opt](inverted index) prevent excessive memory usage caused by too many terms. #33609
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
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
clang-tidy review says "All clean, LGTM! 👍" |
xiaokang
left a comment
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.
pls add testcase
| return 0; | ||
| }; | ||
| re2::RE2 pattern(terms[0]); | ||
| std::vector<std::string> results; |
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 original name terms is more easy to understand.
| std::vector<Term*> _terms; | ||
| std::vector<TermDocs*> _term_docs; | ||
| std::vector<TermIterator> _term_iterators; | ||
| // std::vector<Term*> _terms; |
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.
just delete
| // std::vector<TermDocs*> _term_docs; | ||
| // std::vector<TermIterator> _term_iterators; | ||
|
|
||
| std::wstring _field_name; |
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.
It's better to put common fields: _filed_name and _terms in parent class Query.
| for (int i = 0; i < _terms.size(); i++) { | ||
| if (i == 0) { | ||
| func(iter, true); | ||
| func(_terms[i], true); |
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.
use one call func(_terms[i], i == 0) instead of if else
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 38352 ms |
TPC-DS: Total hot run time: 185122 ms |
ClickBench: Total hot run time: 30 s |
|
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
xiaokang
left a comment
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.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
Proposed changes
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...