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/07/23 15:51:59 UTC

[GitHub] [doris] compasses opened a new pull request, #11144: [Optimize](page cache): bypass page cache during compaction

compasses opened a new pull request, #11144:
URL: https://github.com/apache/doris/pull/11144

   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   This PR help bypass the page cache during compaction. Before this , the index page cache and segment cache will be polluted during compaction, which would lead to query latency shaking when under high load of compaction. 
   
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   2. Has unit tests been added: (No Need)
   3. Has document been added or modified: (No Need)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (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] compasses commented on a diff in pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by GitBox <gi...@apache.org>.
compasses commented on code in PR #11144:
URL: https://github.com/apache/doris/pull/11144#discussion_r928937707


##########
be/src/olap/merger.cpp:
##########
@@ -41,8 +41,9 @@ Status Merger::merge_rowsets(TabletSharedPtr tablet, ReaderType reader_type,
     reader_params.reader_type = reader_type;
     reader_params.rs_readers = src_rowset_readers;
     reader_params.version = dst_rowset_writer->version();
-
     reader_params.tablet_schema = cur_tablet_schema;
+    reader_params.use_page_cache = false; // shouldn't use page cache

Review Comment:
   Yes, I see. but this field is not a new one, here just make sure it was set properly. BTW, If we have option for page cache switch, I think it's better to treat the option with top priority. 



-- 
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] dataroaring commented on a diff in pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by GitBox <gi...@apache.org>.
dataroaring commented on code in PR #11144:
URL: https://github.com/apache/doris/pull/11144#discussion_r928138557


##########
be/src/olap/rowset/beta_rowset_reader.cpp:
##########
@@ -88,7 +88,7 @@ Status BetaRowsetReader::init(RowsetReaderContext* read_context) {
     // load segments
     RETURN_NOT_OK(SegmentLoader::instance()->load_segments(
             _rowset, &_segment_cache_handle,
-            read_context->reader_type == ReaderType::READER_QUERY));

Review Comment:
   for compaction, reader_type is not READER_QUERY, it does not use cache?



-- 
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] morningman commented on a diff in pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #11144:
URL: https://github.com/apache/doris/pull/11144#discussion_r928358670


##########
be/src/olap/merger.cpp:
##########
@@ -41,8 +41,9 @@ Status Merger::merge_rowsets(TabletSharedPtr tablet, ReaderType reader_type,
     reader_params.reader_type = reader_type;
     reader_params.rs_readers = src_rowset_readers;
     reader_params.version = dst_rowset_writer->version();
-
     reader_params.tablet_schema = cur_tablet_schema;
+    reader_params.use_page_cache = false; // shouldn't use page cache

Review Comment:
   No need to add this field. We can just use `reader_type` to judge whether to use page cache.
   And for compaction operation, the reader_type is NOT `READER_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


[GitHub] [doris] github-actions[bot] commented on pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by github-actions.
github-actions[bot] commented on PR #11144:
URL: https://github.com/apache/doris/pull/11144#issuecomment-1399362155

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
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] compasses commented on a diff in pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by GitBox <gi...@apache.org>.
compasses commented on code in PR #11144:
URL: https://github.com/apache/doris/pull/11144#discussion_r928192503


##########
be/src/olap/rowset/beta_rowset_reader.cpp:
##########
@@ -88,7 +88,7 @@ Status BetaRowsetReader::init(RowsetReaderContext* read_context) {
     // load segments
     RETURN_NOT_OK(SegmentLoader::instance()->load_segments(
             _rowset, &_segment_cache_handle,
-            read_context->reader_type == ReaderType::READER_QUERY));

Review Comment:
   Yes, here just make sure it follow the option and to prevent misuse. Since the reader type default value is *READER_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


[GitHub] [doris] github-actions[bot] closed pull request #11144: [Optimize](page cache): bypass page cache during compaction

Posted by github-actions.
github-actions[bot] closed pull request #11144: [Optimize](page cache): bypass page cache during compaction
URL: https://github.com/apache/doris/pull/11144


-- 
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