Sign In Try Free

保持TiFlash集群

This document describes how to perform common operations when you maintain aTiFlashcluster, including checking the TiFlash version. This document also introduces critical logs and a system table of TiFlash.

Check the TiFlash version

There are two ways to check the TiFlash version:

  • If the binary file name of TiFlash istiflash, you can check the version by executing the./tiflash versioncommand.

    However, to execute the above command, you need to add the directory path which includes thelibtiflash_proxy.sodynamic library to theLD_LIBRARY_PATHenvironment variable. This is because the running of TiFlash relies on thelibtiflash_proxy.sodynamic library.

    For example, whentiflashandlibtiflash_proxy.soare in the same directory, you can first switch to this directory, and then use the following command to check the TiFlash version:

    
                    
    LD_LIBRARY_PATH=./ ./tiflash version
  • Check the TiFlash version by referring to the TiFlash log. For the log path, see the[logger]part inthetiflash.tomlfile. For example:

    
                    
    : TiFlash version: TiFlash 0.2.0 master-375035282451103999f3863c691e2fc2

TiFlash critical logs

Log Information Log Description
[INFO] [] ["KVStore: Start to persist [region 47, applied: term 6 index 10]"] [thread_id=23] Data starts to be replicated (the number in the square brackets at the start of the log refers to the thread ID
[DEBUG] [] ["CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute(): Handling DAG request"] [thread_id=30] Handling DAG request, that is, TiFlash starts to handle a Coprocessor request
[DEBUG] [] ["CoprocessorHandler: grpc::Status DB::CoprocessorHandler::execute(): Handle DAG request done"] [thread_id=30] Handling DAG request done, that is, TiFlash finishes handling a Coprocessor request

你可以找到beginning or the end of a Coprocessor request, and then locate the related logs of the Coprocessor request through the thread ID printed at the start of the log.

TiFlash system table

The column names and their descriptions of theinformation_schema.tiflash_replicasystem table are as follows:

Column Name Description
TABLE_SCHEMA Database name
TABLE_NAME Table name
TABLE_ID Table ID
REPLICA_COUNT Number of TiFlash replicas
LOCATION_LABELS The hint for PD, based on which multiple replicas in a Region are scattered
AVAILABLE Available or not (0/1)
PROGRESS Replication progress[0.0~1.0]
Download PDF Request docs changes Ask questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Was this page helpful?
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
©2023PingCAP. All Rights Reserved.