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 2022/09/14 07:44:31 UTC
[GitHub] [doris] zxealous opened a new pull request, #12597: (enhancement)(cache) Add remote segment cache statistics to profile
zxealous opened a new pull request, #12597:
URL: https://github.com/apache/doris/pull/12597
# Proposed changes
Issue Number: close #xxx
## Problem summary
Add some segment cache statistics, for example:
```
Query:
Summary:
- Start Time: 2022-09-14 15:18:27
- End Time: 2022-09-14 15:18:28
- Total: 1s339ms
- Query State: EOF
- Query ID: 3042c4b738594677-b8e267fb3d97ea93
- Query Type: Query
- Doris Version: trunk
- User: root
- Default Db: default_cluster:test
- Sql Statement: select * from table_s3
- Is Cached: No
- Trace ID:
Execution Summary:
- Analysis Time: 17.768ms
- Plan Time: 75.774ms
- Schedule Time: 845.839ms
- Wait and Fetch Result Time: 379.989ms
Segment Cache Statistics:
- ReadSegmentCacheFilesNum: 11
- DownloadSegmentCacheFilesNum: 3
- HitSegmentCacheFilesNum: 8
- HitSegmentCacheFilesPercent: 72.73%
```
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [x] 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] zxealous closed pull request #12597: (enhancement)(cache) Add remote segment cache statistics to profile
Posted by GitBox <gi...@apache.org>.
zxealous closed pull request #12597: (enhancement)(cache) Add remote segment cache statistics to profile
URL: https://github.com/apache/doris/pull/12597
--
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] zxealous commented on a diff in pull request #12597: (enhancement)(cache) Add remote segment cache statistics to profile
Posted by GitBox <gi...@apache.org>.
zxealous commented on code in PR #12597:
URL: https://github.com/apache/doris/pull/12597#discussion_r970474029
##########
be/src/olap/rowset/segment_v2/segment.h:
##########
@@ -106,6 +107,8 @@ class Segment : public std::enable_shared_from_this<Segment> {
return _footer.primary_key_index_meta().max_key();
};
+ io::FileReaderSPtr get_file_reader() { return _file_reader; }
Review Comment:
unused, delete it
--
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] pengxiangyu commented on a diff in pull request #12597: (enhancement)(cache) Add remote segment cache statistics to profile
Posted by GitBox <gi...@apache.org>.
pengxiangyu commented on code in PR #12597:
URL: https://github.com/apache/doris/pull/12597#discussion_r970510670
##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -52,6 +52,7 @@ Status Segment::open(io::FileSystem* fs, const std::string& path, const std::str
cache_path, config::file_cache_alive_time_sec, file_reader,
config::file_cache_type);
segment->_file_reader = cache_reader;
+ cache_reader->init_cache_stats(is_query, stats);
Review Comment:
Segment is reused, stats need to be reset to 0 for each query.
--
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