batchCop writes data to TiDB just using one thread.
Open
@JaySon-Huang is already working on this.
Since Jul 11, 2022.
component/compute
type/enhancement
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
{
if (!dag_context.retry_regions.empty())
{
coprocessor::BatchResponse response;
for (const auto & region : dag_context.retry_regions)
{
auto * retry_region = response.add_retry_regions();
retry_region->set_id(region.region_id);
retry_region->mutable_region_epoch()->set_conf_ver(region.region_conf_version);
retry_region->mutable_region_epoch()->set_version(region.region_version);
}
writer->Write(response);
}
auto streaming_writer = std::make_shared<StreamWriter>(writer);
TiDB::TiDBCollators collators;
std::unique_ptr<DAGResponseWriter> response_writer = std::make_unique<StreamingDAGResponseWriter<StreamWriterPtr>>(
streaming_writer,
std::vector<Int64>(),
collators,
tipb::ExchangeType::PassThrough,
context.getSettingsRef().dag_records_per_chunk,
context.getSettingsRef().batch_send_min_limit,
true,
dag_context);
dag_output_stream = std::make_shared<DAGBlockOutputStream>(streams.in->getHeader(), std::move(response_writer));
copyData(*streams.in, *dag_output_stream);
}
2. What did you expect to see? (Required)
3. What did you see instead (Required)
batchCop send blocks just using one sync grpc thread.
the thread should encode then send to tidb/tiflash.
TODO:
move the streamWriter in the stream.in.
4. What is your TiFlash version? (Required)
master
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.