Fix estimate row count of data inserted by current trx

This commit is contained in:
haitaoyang
2023-05-10 13:28:12 +00:00
committed by ob-robot
parent e23cc9ead4
commit cb1af1dc53
13 changed files with 45 additions and 19 deletions

View File

@ -486,7 +486,8 @@ int ObTableScanIterator::can_retire_to_row_sample(bool &retire)
} else if (memtables.count() > 0) {
ObPartitionEst batch_est;
ObSEArray<ObEstRowCountRecord, MAX_SSTABLE_CNT_IN_STORAGE> est_records;
ObTableEstimateBaseInput base_input(scan_param_->scan_flag_, memtables.at(0)->get_key().tablet_id_.id(), memtables, get_table_param_.tablet_iter_.tablet_handle_);
ObTableEstimateBaseInput base_input(scan_param_->scan_flag_, memtables.at(0)->get_key().tablet_id_.id(),
transaction::ObTransID(), memtables, get_table_param_.tablet_iter_.tablet_handle_);
if (OB_FAIL(ObTableEstimator::estimate_row_count_for_scan(base_input, table_scan_range_.get_ranges(), batch_est, est_records))) {
STORAGE_LOG(WARN, "Failed to estimate row count for scan", K(ret), KPC(scan_param_), K(table_scan_range_));
} else {