Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tx_service/include/cc/cc_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -4342,6 +4342,8 @@ struct RangePartitionDataSyncScanCc : public CcRequestBase

bool IsSlicePinned(uint16_t core_id) const
{
assert(export_base_table_item_ ||
curr_slice_index_[core_id] < slices_to_scan_.size());
return export_base_table_item_
? true
: slices_to_scan_[curr_slice_index_[core_id]].second;
Expand Down
12 changes: 10 additions & 2 deletions tx_service/include/cc/template_cc_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -5610,7 +5610,11 @@ class TemplateCcMap : public CcMap
recycle_ts = shard_->GlobalMinSiTxStartTs();
}

bool slice_pinned = req.IsSlicePinned(shard_->core_id_);
// If reach to the batch end, it means there are no slices that need to
// be scanned.
bool slice_pinned = req.TheBatchEnd(shard_->core_id_)
? false
: req.IsSlicePinned(shard_->core_id_);
// The following flag is used to mark the behavior of one slice.
// Only need to export the key if the key is already persisted, this
// will happen when the slice need to split, and should export all the
Expand Down Expand Up @@ -5718,7 +5722,11 @@ class TemplateCcMap : public CcMap
std::tie(key_it, slice_end_it, slice_end_key) =
find_non_empty_slice(*search_start_key);

slice_pinned = req.IsSlicePinned(shard_->core_id_);
// If reach to the batch end, it means there are no slices
// that need to be scanned.
slice_pinned = req.TheBatchEnd(shard_->core_id_)
? false
: req.IsSlicePinned(shard_->core_id_);
export_persisted_key_only =
!req.export_base_table_item_ && slice_pinned;
}
Expand Down