yiguolei commented on a change in pull request #1400: Acquire rs readers at the
beginning of the olapscanner
URL: https://github.com/apache/incubator-doris/pull/1400#discussion_r298016335
##########
File path: be/src/exec/olap_scanner.cpp
##########
@@ -150,6 +150,20 @@ Status OlapScanner::_init_params(
_params.aggregation = _aggregation;
_params.version = Version(0, _version);
+ // acquire tablet rowset readers at the beginning of the scan node
+ // to prevent this case: when there are lots of olap scanners to run for
example 10000
+ // the rowsets maybe compacted when the last olap scanner starts
+ _tablet->obtain_header_rdlock();
+ OLAPStatus acquire_reader_st =
_tablet->capture_rs_readers(_params.version, &_params.rs_readers);
+ _tablet->release_header_lock();
Review comment:
currently could not. because some times we do step 1 step 2 step 3 and step
3 is capture_rs_readers. If add lock in capture rs readers will be dead lock.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]