Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#8511
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
SeaRise authored and ti-chi-bot committed Dec 15, 2023
1 parent e63e249 commit 63bdd78
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions dbms/src/Storages/DeltaMerge/ReadThread/UnorderedInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,33 @@ class UnorderedInputStream : public IProfilingBlockInputStream
LOG_DEBUG(log, "Created, pool_id={} ref_no={}", task_pool->poolId(), ref_no);
}

<<<<<<< HEAD
~UnorderedInputStream()
{
task_pool->decreaseUnorderedInputStreamRefCount();
LOG_DEBUG(log, "Destroy, pool_id={} ref_no={}", task_pool->poolId(), ref_no);
}
=======
void cancel(bool /*kill*/) override { decreaseRefCount(); }

~UnorderedInputStream() override { decreaseRefCount(); }
>>>>>>> adf8569627 (Refine cancel for read thread stream (#8511))

String getName() const override { return NAME; }

Block getHeader() const override { return header; }

protected:
void decreaseRefCount()
{
bool ori = false;
if (is_stopped.compare_exchange_strong(ori, true))
{
task_pool->decreaseUnorderedInputStreamRefCount();
LOG_DEBUG(log, "Destroy, pool_id={} ref_no={}", task_pool->pool_id, ref_no);
}
}

Block readImpl() override
{
FilterPtr filter_ignored;
Expand Down Expand Up @@ -139,6 +155,15 @@ class UnorderedInputStream : public IProfilingBlockInputStream
LoggerPtr log;
int64_t ref_no;
size_t total_rows = 0;
<<<<<<< HEAD
bool task_pool_added;
=======

// runtime filter
std::vector<RuntimeFilterPtr> runtime_filter_list;
int max_wait_time_ms;

std::atomic_bool is_stopped = false;
>>>>>>> adf8569627 (Refine cancel for read thread stream (#8511))
};
} // namespace DB::DM

0 comments on commit 63bdd78

Please sign in to comment.