pingcap / pingcap/tiflash

database "system" is dropped when api_version=2

Open
#7,147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

affects-7.5 affects-8.1 component/storage severity/moderate type/bug
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)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
{"log":"[TiDBSchemaSyncer.h:170] [\"End sync schema, version has been updated to 0(latest diff is empty)\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
{"log":"[SchemaBuilder.cpp:1415] [\"Dropped all schemas.\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
{"log":"[SchemaBuilder.cpp:979] [\"Tombstoned database system\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
{"log":"[SchemaBuilder.cpp:958] [\"Tombstoning database system\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
{"log":"[SchemaBuilder.cpp:1385] [\"Dropping all schemas.\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
{"log":"[TiDBSchemaSyncer.h:135] [\"Start to drop schemas. schema version key not exists, keyspace should be deleted\"] [source=\"keyspace=4294967295\"] [thread_id=27]","container":"data0","pod":"tc-tiflash-1","level":"INFO","namespace":""}
4. What is your TiFlash version? (Required)

master

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 reading SchemaBuilder.cpp around lines 958, 979, 1385, 1415 and TiDBSchemaSyncer.h around lines 135 and 170, then establish a reproducible api_version=2 case from the reported logs. Done means the system database is no longer dropped during schema synchronization, with the relevant behavior verified against a regression test if the existing test structure identifies one.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.