kangpinghuang commented on a change in pull request #1200: Merge refactor code
into master
URL: https://github.com/apache/incubator-doris/pull/1200#discussion_r288459032
##########
File path: be/src/exec/olap_scanner.cpp
##########
@@ -80,29 +80,30 @@ Status OlapScanner::_prepare(
strtoul(scan_range->scan_range().version_hash.c_str(), nullptr, 10);
{
std::string err;
- _olap_table = OLAPEngine::get_instance()->get_table(tablet_id,
schema_hash, true, &err);
- if (_olap_table.get() == nullptr) {
+ _tablet =
StorageEngine::instance()->tablet_manager()->get_tablet(tablet_id, schema_hash,
true, &err);
+ if (_tablet.get() == nullptr) {
std::stringstream ss;
- ss << "failed to get tablet: " << tablet_id << " with schema hash:
" << schema_hash
- << ", reason: " << err;
+ ss << "failed to get tablet. tablet_id=" << tablet_id
+ << ", with schema_hash=" << schema_hash
+ << ", reason=" << err;
LOG(WARNING) << ss.str();
return Status(ss.str());
}
{
- ReadLock rdlock(_olap_table->get_header_lock_ptr());
- const PDelta* delta = _olap_table->lastest_version();
- if (delta == NULL) {
+ ReadLock rdlock(_tablet->get_header_lock_ptr());
+ const RowsetSharedPtr rowset = _tablet->rowset_with_max_version();
+ if (rowset == NULL) {
Review comment:
```suggestion
if (rowset == nullptr) {
```
----------------------------------------------------------------
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]