You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/08 10:34:08 UTC
[GitHub] [doris] zbtzbtzbt opened a new pull request, #15713: [refactor] separate agg and flush in memtable
zbtzbtzbt opened a new pull request, #15713:
URL: https://github.com/apache/doris/pull/15713
# Proposed changes
refactor some of your code @spaces-X
cc thanks
keys:
- separate nedd_to_agg and flush in memtable
- rename var and function
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374830673
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374810095
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.79 seconds
load time: 480 seconds
storage size: 17119775495 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230108112744_clickbench_pr_75614.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374829317
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1377093549
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] Gabriel39 merged pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
Gabriel39 merged PR #15713:
URL: https://github.com/apache/doris/pull/15713
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] spaces-X commented on a diff in pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
spaces-X commented on code in PR #15713:
URL: https://github.com/apache/doris/pull/15713#discussion_r1064256108
##########
be/src/olap/delta_writer.cpp:
##########
@@ -170,14 +170,14 @@ Status DeltaWriter::write(const vectorized::Block* block, const std::vector<int>
_total_received_rows += row_idxs.size();
_mem_table->insert(block, row_idxs);
- if (_mem_table->need_to_agg()) {
+ if (_mem_table->need_agg()) {
Review Comment:
Suggest to add `UNLIKELY` when calling `need_agg` and `need_flush` , since the size of a block is much smaller than 200MB.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374830678
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zbtzbtzbt commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
zbtzbtzbt commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374997705
fix conflict
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on a diff in pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on code in PR #15713:
URL: https://github.com/apache/doris/pull/15713#discussion_r1064119802
##########
be/src/olap/memtable.cpp:
##########
@@ -386,13 +386,15 @@ void MemTable::shrink_memtable_by_agg() {
_collect_vskiplist_results<false>();
}
-bool MemTable::is_flush() const {
+bool MemTable::need_flush() const {
return memory_usage() >= config::write_buffer_size;
}
-bool MemTable::need_to_agg() {
- return keys_type() == KeysType::DUP_KEYS ? is_flush()
- : memory_usage() >= config::memtable_max_buffer_size;
+bool MemTable::need_agg() const {
+ if (keys_type() == KeysType::AGG_KEYS)
+ return memory_usage() >= config::write_buffer_size_for_agg;
Review Comment:
warning: statement should be inside braces [readability-braces-around-statements]
```suggestion
if (keys_type() == KeysType::AGG_KEYS) {
return memory_usage() >= config::write_buffer_size_for_agg;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] spaces-X commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
spaces-X commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374829999
Nice work!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1376576265
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1374998490
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zbtzbtzbt commented on a diff in pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
zbtzbtzbt commented on code in PR #15713:
URL: https://github.com/apache/doris/pull/15713#discussion_r1064259991
##########
be/src/olap/delta_writer.cpp:
##########
@@ -170,14 +170,14 @@ Status DeltaWriter::write(const vectorized::Block* block, const std::vector<int>
_total_received_rows += row_idxs.size();
_mem_table->insert(block, row_idxs);
- if (_mem_table->need_to_agg()) {
+ if (_mem_table->need_agg()) {
Review Comment:
ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15713: [refactor] separate agg and flush in memtable
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15713:
URL: https://github.com/apache/doris/pull/15713#issuecomment-1375065078
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org