pingcap / pingcap/tiflash

Support orphan key check after restart

Open
#7,752 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Enhancement

Currently, orphan key info is not persisted since its extra cost.

However, we can only persist 2 extra integers to support this. The main idea is we can scan all keys after restore, and add all orphan keys into orphan key info. This is because:

  1. An orphan key is a write key which lacks corresponding default key.
  2. The orphan key in persisted region must be valid.

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

No source files, tests, or entry points are named. Start by tracing restore handling and the orphan key information in the TiFlash codebase, then determine how scanning all keys after restore can repopulate valid orphan keys without persisting the full set. Done means orphan key information is available correctly after restart while persistence adds only the proposed two integers.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.