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 2020/07/23 04:27:02 UTC
[GitHub] [incubator-doris] HappenLee opened a new pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
HappenLee opened a new pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152
issue:#3926
## Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
## Types of changes
What types of changes does your code introduce to Doris?
_Put an `x` in the boxes that apply_
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation Update (if none of the other choices apply)
## Checklist
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
- [x] I have create an issue on [Doris's issues](https://github.com/apache/incubator-doris/issues), and have described the bug/feature there in detail
- [x] Commit messages in my PR start with the related issues ID, like "#4071 Add pull request template to doris project"
- [x] Compiling and unit tests pass locally with my changes
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] If this change need a document change, I have updated the document
- [x] Any dependent changes have been merged
----------------------------------------------------------------
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.
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] [incubator-doris] wutiangan commented on a change in pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
wutiangan commented on a change in pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152#discussion_r459245087
##########
File path: be/src/runtime/bufferpool/suballocator.h
##########
@@ -128,6 +129,10 @@ class Suballocator {
// if list is empty.
std::unique_ptr<Suballocation> PopFreeListHead(int list_idx);
+ // Get the allocation at the head of the free list at index 'list_idx'. Return nullptr
+ // if list is empty.
+ bool CheckFreeListHead(int list_idx) const;
+
Review comment:
Modify annotation, the annotation is not consistent with function.
----------------------------------------------------------------
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.
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] [incubator-doris] morningman merged pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
morningman merged pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152
----------------------------------------------------------------
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.
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] [incubator-doris] HappenLee commented on a change in pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152#discussion_r459310624
##########
File path: be/src/runtime/bufferpool/suballocator.h
##########
@@ -128,6 +129,10 @@ class Suballocator {
// if list is empty.
std::unique_ptr<Suballocation> PopFreeListHead(int list_idx);
+ // Get the allocation at the head of the free list at index 'list_idx'. Return nullptr
+ // if list is empty.
+ bool CheckFreeListHead(int list_idx) const;
+
Review comment:
ok,I will change the name
----------------------------------------------------------------
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.
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] [incubator-doris] kangkaisen commented on a change in pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152#discussion_r459325003
##########
File path: be/src/runtime/buffered_tuple_stream2.h
##########
@@ -257,6 +257,11 @@ class BufferedTupleStream2 {
bool has_tuple_footprint() const {
return _fixed_tuple_row_size > 0 || !_string_slots.empty() || _nullable_tuple;
}
+ /// Returns true if the row consumes any memory. If false, the stream only needs to
+ /// store the count of rows.
+ bool row_consumes_memory() const {
Review comment:
**I think the implementation isn't consistent with the method comment and name.**
Only if there has one tuple. _fixed_tuple_row_size will large than zero.
```
for (int i = 0; i < _desc.tuple_descriptors().size(); ++i) {
const TupleDescriptor* tuple_desc = _desc.tuple_descriptors()[i];
const int tuple_byte_size = tuple_desc->byte_size();
_fixed_tuple_row_size += tuple_byte_size;
if (!tuple_desc->string_slots().empty()) {
_string_slots.push_back(make_pair(i, tuple_desc->string_slots()));
}
// if (!tuple_desc->collection_slots().empty()) {
// _collection_slots.push_back(make_pair(i, tuple_desc->collection_slots()));
// }
}
```
----------------------------------------------------------------
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.
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] [incubator-doris] HappenLee commented on a change in pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
HappenLee commented on a change in pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152#discussion_r459824447
##########
File path: be/src/runtime/buffered_tuple_stream2.h
##########
@@ -257,6 +257,11 @@ class BufferedTupleStream2 {
bool has_tuple_footprint() const {
return _fixed_tuple_row_size > 0 || !_string_slots.empty() || _nullable_tuple;
}
+ /// Returns true if the row consumes any memory. If false, the stream only needs to
+ /// store the count of rows.
+ bool row_consumes_memory() const {
Review comment:
I will change the fun name
----------------------------------------------------------------
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.
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] [incubator-doris] wutiangan commented on a change in pull request #4152: [Spill To Disk][2/6] Add some runningtime function and change some function will be called in the future
Posted by GitBox <gi...@apache.org>.
wutiangan commented on a change in pull request #4152:
URL: https://github.com/apache/incubator-doris/pull/4152#discussion_r459243245
##########
File path: be/src/runtime/bufferpool/suballocator.cc
##########
@@ -219,6 +230,10 @@ unique_ptr<Suballocation> Suballocator::PopFreeListHead(int list_idx) {
return result;
}
+bool Suballocator::CheckFreeListHead(int list_idx) const {
+ return free_lists_[list_idx] != nullptr;
Review comment:
CheckFreeListHeadIsNotNull
----------------------------------------------------------------
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.
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