[opt](inverted index) prevent excessive memory usage caused by too many terms.#33609
[opt](inverted index) prevent excessive memory usage caused by too many terms.#33609qidaye merged 1 commit intoapache:masterfrom
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! 👍" |
| return 0; | ||
| }; | ||
| re2::RE2 pattern(terms[0]); | ||
| std::vector<std::string> results; |
There was a problem hiding this comment.
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; |
| // std::vector<TermDocs*> _term_docs; | ||
| // std::vector<TermIterator> _term_iterators; | ||
|
|
||
| std::wstring _field_name; |
There was a problem hiding this comment.
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.
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' |
|
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...