pingcap / pingcap/tiflash

Also limit the size of block in bytes when processing queries in TiFlash

Open
#892 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority/P1
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Currently, TiFlash processes data in Blocks, and use max_block_size to suggest the size of one block. max_block_size only suggest the rows, which is not quite enough. For example, when there are too many columns, only limits the rows of block can still cause too much memory is used. ClickHouse already supports preferred_block_size_bytes and we should follow.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how TiFlash applies max_block_size while processing query Blocks, then compare the requested behavior with ClickHouse's preferred_block_size_bytes documentation. Done means blocks are constrained by both row count and byte size, with tests or measurements covering wide rows and preventing excessive memory use.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.