imay commented on a change in pull request #2575: [Doirs-On-Elasticsearch]
Accerlate first scroll search
URL: https://github.com/apache/incubator-doris/pull/2575#discussion_r361401564
##########
File path: be/src/exec/es/es_scan_reader.cpp
##########
@@ -62,7 +62,10 @@ ESScanReader::ESScanReader(const std::string& target, const
std::map<std::string
} else {
_exactly_once = false;
// scroll request for scanning
- _init_scroll_url = _target + REQUEST_SEPARATOR + _index +
REQUEST_SEPARATOR + _type + "/_search?scroll=" + _scroll_keep_alive +
REQUEST_PREFERENCE_PREFIX + _shards + "&" + REUQEST_SCROLL_FILTER_PATH;
+ // add terminate_after for the first scroll to avoid decompress all
postings list
+ _init_scroll_url = _target + REQUEST_SEPARATOR + _index +
REQUEST_SEPARATOR + _type + "/_search?scroll=" + _scroll_keep_alive +
REQUEST_PREFERENCE_PREFIX + _shards
+ + "&" + REUQEST_SCROLL_FILTER_PATH
+ + "&terminate_after=" + batch_size_str;
Review comment:
Better to use Substitute or std::stringstream
There are too many string add operation, it will introduce too many string
copy
----------------------------------------------------------------
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]