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
6 changes: 3 additions & 3 deletions be/src/runtime/load_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Status LoadChannel::open(const PTabletWriterOpenRequest& params) {
_is_high_priority, _self_profile);
}
{
std::lock_guard<SpinLock> l(_tablets_channels_lock);
std::lock_guard<std::mutex> l(_tablets_channels_lock);
_tablets_channels.insert({index_id, channel});
}
}
Expand Down Expand Up @@ -237,7 +237,7 @@ Status LoadChannel::_handle_eos(BaseTabletsChannel* channel,
if (finished) {
std::lock_guard<std::mutex> l(_lock);
{
std::lock_guard<SpinLock> l(_tablets_channels_lock);
std::lock_guard<std::mutex> l(_tablets_channels_lock);
_tablets_channels_rows.insert(std::make_pair(
index_id,
std::make_pair(channel->total_received_rows(), channel->num_rows_filtered())));
Expand All @@ -263,7 +263,7 @@ void LoadChannel::_report_profile(PTabletWriterAddBlockResult* response) {
_self_profile->set_timestamp(_last_updated_time);

{
std::lock_guard<SpinLock> l(_tablets_channels_lock);
std::lock_guard<std::mutex> l(_tablets_channels_lock);
for (auto& it : _tablets_channels) {
it.second->refresh_profile();
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/runtime/load_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class LoadChannel {
std::unordered_map<int64_t, std::shared_ptr<BaseTabletsChannel>> _tablets_channels;
// index id -> (received rows, filtered rows)
std::unordered_map<int64_t, std::pair<size_t, size_t>> _tablets_channels_rows;
SpinLock _tablets_channels_lock;
std::mutex _tablets_channels_lock;
// This is to save finished channels id, to handle the retry request.
std::unordered_set<int64_t> _finished_channel_ids;
// set to true if at least one tablets channel has been opened
Expand Down