Sign In Try Free

TiDB 3.0 GA Release Notes

Release date: June 28, 2019

TiDB version: 3.0.0

TiDB Ansible version: 3.0.0

Overview

On June 28, 2019, TiDB 3.0 GA is released. The corresponding TiDB Ansible version is 3.0.0. Compared with TiDB 2.1, this release has greatly improved in the following aspects:

  • Stability. TiDB 3.0 has demonstrated long-term stability for large-scale clusters with up to 150+ nodes and 300+ TB of storage.
  • Usability. TiDB 3.0 has multi-facet improvements in usability, including standardized slow query logs, well-developed log file specification, and new features such asEXPLAIN ANALYZEand SQL Trace to save operation costs for users.
  • Performance. The performance of TiDB 3.0 is 4.5 times greater than TiDB 2.1 in TPC-C benchmarks, and over 1.5 times in Sysbench benchmarks. Thanks to the support for Views, TPC-H 50G Q15 can now run normally.
  • New features including Window Functions, Views (Experimental), partitioned tables, the plugin framework, pessimistic locking (Experimental), andSQL Plan Management.

TiDB

  • New Features
    • Support Window Functions; compatible with all window functions in MySQL 8.0, includingNTILE,LEAD,LAG,PERCENT_RANK,NTH_VALUE,CUME_DIST,FIRST_VALUE,LAST_VALUE,RANK,DENSE_RANK, andROW_NUMBER
    • Support Views (Experimental)
    • Improve Table Partition
      • Support Range Partition
      • Support Hash Partition
    • Add the plug-in framework, supporting plugins such as IP Whitelist (Enterprise) and Audit Log (Enterprise).
    • Support the SQL Plan Management function to create SQL execution plan binding to ensure query stability (Experimental)
  • SQL Optimizer
    • Optimize theNOT EXISTSsubquery and convert it toAnti Semi Jointo improve performance
    • Optimize the constant propagation on theOuter Join, and add the optimization rule ofOuter Joinelimination to reduce non-effective computations and improve performance
    • Optimize theINsubquery to executeInner Joinafter aggregation to improve performance
    • OptimizeIndex Jointo adapt to more scenarios
    • Improve the Partition Pruning optimization rule of Range Partition
    • Optimize the query logic for_tidb_rowidto avoid full table scan and improve performance
    • Match more prefix columns of the indexes when extracting access conditions of composite indexes if there are relevant columns in the filter to improve performance
    • Improve the accuracy of cost estimates by using order correlation between columns
    • OptimizeJoin Orderbased on the greedy strategy and the dynamic programming algorithm to speed up the join operation of multiple tables
    • Support Skyline Pruning, with some rules to prevent the execution plan from relying too heavily on statistics to improve query stability
    • Improve the accuracy of row count estimation for single-column indexes with NULL values
    • SupportFAST ANALYZE随机样本的每个区域,以避免table scan and improve performance with statistics collection
    • Support the incremental Analyze operation on monotonically increasing index columns to improve performance with statistics collection
    • Support using subqueries in theDOstatement
    • Support usingIndex Joinin transactions
    • Optimizeprepare/executeto support DDL statements with no parameters
    • Modify the system behavior to auto load statistics when thestats-leasevariable value is 0
    • Support exporting historical statistics
    • Support thedump/loadcorrelation of histograms
  • SQL Execution Engine
    • Optimize log output:EXECUTEoutputs user variables andCOMMIToutputs slow query logs to facilitate troubleshooting
    • Support theEXPLAIN ANALYZEfunction to improve SQL tuning usability
    • Support theadmin show next_row_idcommand to get the ID of the next row
    • Add six built-in functions:JSON_QUOTE,JSON_ARRAY_APPEND,JSON_MERGE_PRESERVE,BENCHMARK,COALESCE, andNAME_CONST
    • Optimize control logics on the chunk size to dynamically adjust based on the query context, to reduce the SQL execution time and resource consumption
    • 支持跟踪和控制rolling memory usage in three operators -TableReader,IndexReaderandIndexLookupReader
    • Optimize the Merge Join operator to support an emptyONcondition
    • Optimize write performance for single tables that contains too many columns
    • Improve the performance ofadmin show ddl jobsby supporting scanning data in reverse order
    • Add thesplit table regionstatement to manually split the table Region to alleviate hotspot issues
    • Add thesplit index regionstatement to manually split the index Region to alleviate hotspot issues
    • Add a blocklist to prohibit pushing down expressions to Coprocessor
    • Optimize theExpensive Querylog to print the SQL query in the log when it exceeds the configured limit of execution time or memory
  • DDL
    • Support migrating from character setutf8toutf8mb4
    • Change the default character set fromutf8toutf8mb4
    • Add thealter schemastatement to modify the character set and the collation of the database
    • Support ALTER algorithmINPLACE/INSTANT
    • SupportSHOW CREATE VIEW
    • SupportSHOW CREATE USER
    • Support fast recovery of mistakenly deleted tables
    • Support adjusting the number of concurrencies of ADD INDEX dynamically
    • Add thepre_split_regions选项,当创建th策略预先分配区域e table using theCREATE TABLEstatement, to relieve write hot Regions caused by lots of writes after the table creation
    • Support splitting Regions by the index and range of the table specified using SQL statements to relieve hotspot issues
    • Add theddl_error_count_limitglobal variable to limit the number of DDL task retries
    • Add a feature to useSHARD_ROW_ID_BITSto scatter row IDs when the column contains an AUTO_INCREMENT attribute to relieve hotspot issues
    • Optimize the lifetime of invalid DDL metadata to speed up recovering the normal execution of DDL operations after upgrading the TiDB cluster
  • Transactions
    • Support the pessimistic transaction mode (Experimental)
    • Optimize transaction processing logics to adapt to more scenarios:
      • Change the default valuetidb_disable_txn_auto_retrytoon, which means non-auto committed transactions will not be retried
      • Add thetidb_batch_commitsystem variable to split a transaction into multiple ones to be executed concurrently
      • Add thetidb_low_resolution_tsosystem variable to control the number of TSOs to obtain in batches and reduce the number of times that transactions request for TSOs, to improve performance in scenarios with relatively low requirement of consistency
      • Add thetidb_skip_isolation_level_checkvariable to control whether to report errors when the isolation level is set to SERIALIZABLE
      • Modify thetidb_disable_txn_auto_retrysystem variable to make it work on all retryable errors
  • Permission Management
    • Perform permission check on theANALYZE,USE,SET GLOBAL, andSHOW PROCESSLISTstatements
    • Support Role Based Access Control (RBAC) (Experimental)
  • Server
    • Optimize slow query logs:
      • Restructure the log format
      • 优化日志内容
      • Optimize the log query method to support using theINFORMATION_SCHEMA.SLOW_QUERYandADMIN SHOW SLOWstatements of the memory table to query slow query logs
    • Develop a unified log format specification with restructured log system to facilitate collection and analysis by tools
    • Support using SQL statements to manage TiDB Binlog services, including querying status, enabling TiDB Binlog, maintaining and sending TiDB Binlog strategies.
    • Support usingunix_socketto connect to the database
    • SupportTracefor SQL statements
    • Support getting information for a TiDB instance via the/debug/zipHTTP interface to facilitate troubleshooting.
    • Optimize monitoring items to facilitate troubleshooting:
      • Add thehigh_error_rate_feedback_totalmonitoring item to monitor the difference between the actual data volume and the estimated data volume based on statistics
      • Add a QPS monitoring item in the database dimension
    • Optimize the system initialization process to only allow the DDL owner to perform the initialization. This reduces the startup time for initialization or upgrading.
    • Optimize the execution logic ofkill queryto improve performance and ensure resource is release properly
    • Add a startup optionconfig-checkto check the validity of the configuration file
    • Add thetidb_back_off_weightsystem variable to control the backoff time of internal error retries
    • Add thewait_timeoutandinteractive_timeoutsystem variables to control the maximum idle connections allowed
    • Add the connection pool for TiKV to shorten the connection establishing time
  • Compatibility
    • Support theALLOW_INVALID_DATESSQL mode
    • Support the MySQL 320 Handshake protocol
    • Support manifesting unsigned BIGINT columns as auto-increment columns
    • Support theSHOW CREATE DATABASE IF NOT EXISTSsyntax
    • Optimize the fault tolerance ofload datafor CSV files
    • Abandon the predicate pushdown operation when the filtering condition contains a user variable to improve the compatibility with MySQL’s behavior of using user variables to simulate Window Functions

PD

  • Support re-creating a cluster from a single node
  • Migrate Region metadata from etcd to the go-leveldb storage engine to solve the storage bottleneck in etcd for large-scale clusters
  • API
    • Add theremove-tombstoneAPI to clear Tombstone stores
    • Add theScanRegionsAPI to batch query Region information
    • Add theGetOperatorAPI to query running operators
    • Optimize the performance of theGetStoresAPI
  • Configurations
    • Optimize configuration check logic to avoid configuration item errors
    • Addenable-two-way-mergeto control the direction of Region merge
    • Addhot-region-schedule-limitto control the scheduling rate for hot Regions
    • Addhot-region-cache-hits-thresholdto identify hotspot when hitting multiple thresholds consecutively
    • Add thestore-balance-rateconfiguration item to control the maximum numbers of balance Region operators allowed per minute
  • Scheduler Optimizations
    • Add the store limit mechanism for separately controlling the speed of operators for each store
    • Support thewaitingOperatorqueue to optimize the resource race among different schedulers
    • Support scheduling rate limit to actively send scheduling operations to TiKV. This improves the scheduling rate by limiting the number of concurrent scheduling tasks on a single node.
    • Optimize theRegion Scatterscheduling to be not restrained by the limit mechanism
    • Add theshuffle-hot-regionscheduler to facilitate TiKV stability test in scenarios of poor hotspot scheduling
  • Simulator
    • Add simulator for data import scenarios
    • Support setting different heartbeats intervals for the Store
  • Others
    • Upgrade etcd to solve the issues of inconsistent log output formats, Leader selection failure in prevote, and lease deadlocking
    • Develop a unified log format specification with restructured log system to facilitate collection and analysis by tools
    • Add monitoring metrics including scheduling parameters, cluster label information, and time consumed by PD to process TSO requests, Store ID, and address information.

TiKV

  • Support distributed GC and concurrent lock resolving for improved GC performance
  • Support reversedraw_scanandraw_batch_scan
  • Support Multi-thread Raftstore and Multi-thread Apply to improve scalabilities, concurrency capacity, and resource usage within a single node. Performance improves by 70% under the same level of pressure
  • Support batch receiving and sending Raft messages, improving TPS by 7% for write intensive scenarios
  • Support checking RocksDB Level 0 files before applying snapshots to avoid write stall
  • Introduce Titan, a key-value plugin that improves write performance for scenarios with value sizes greater than 1KiB, and relieves write amplification in certain degrees
  • Support the pessimistic transaction mode (Experimental)
  • Support getting monitoring information via HTTP
  • Modify the semantics ofInsertto allow Prewrite to succeed only when there is no Key
  • Develop a unified log format specification with restructured log system to facilitate collection and analysis by tools
  • Add performance metrics related to configuration information and key bound crossing
  • Support Local Reader in RawKV to improve performance
  • Engine
    • Optimize memory management to reduce memory allocation and copying forIterator Key Bound Option
    • Supportblock cachesharing among different column families
  • Server
    • Reduce context switch overhead frombatch commands
    • Removetxn scheduler
    • Add monitoring items related toread indexandGC worker
  • RaftStore
    • Support Hibernate Regions to optimize CPU consumption from RaftStore (Experimental)
    • Remove the local reader thread
  • Coprocessor
    • Refactor the computation framework to implement vector operators, computation using vector expressions, and vector aggregations to improve performance
    • Support providing operator execution status for theEXPLAIN ANALYZEstatement in TiDB
    • Switch to thework-stealingthread pool model to reduce context switch cost

Tools

  • TiDB Lightning
    • Support redirected replication of data tables
    • Support importing CSV files
    • 提高性能的转换从SQL千伏pairs
    • Support batch import of single tables to improve performance
    • Support separately importing data and indexes for big tables to improve the performance of TiKV-importer
    • Support filling the missing column using therow_idor the default column value when column data is missing in the new file
    • Support setting a speed limit inTIKV-importerwhen uploading SST files to TiKV
  • TiDB Binlog
    • Add theadvertise-addrconfiguration in Drainer to support the bridge mode in the container environment
    • Add theGetMvccByEncodeKeyfunction in Pump to speed up querying the transaction status
    • Support compressing communication data among components to reduce network resource consumption
    • Add the Arbiter tool that supports reading binlog from Kafka and replicate the data into MySQL
    • Support filtering out files that don’t require replication via Reparo
    • Support replicating generated columns
    • Add thesyncer.sql-modeconfiguration item to support using different sql-modes to parse DDL queries
    • Add thesyncer.ignore-tableconfiguration item to support filtering tables not to be replicated
  • sync-diff-inspector
    • Support checkpoint to record verification status and continue the verification from last saved point after restarting
    • Add theonly-use-checksumconfiguration item to check data consistency by calculating checksum
    • Support using TiDB statistics and multiple columns to split chunks for comparison to adapt to more scenarios

TiDB Ansible

  • Upgrade the following monitoring components to a stable version:
    • Prometheus from V2.2.1 to V2.8.1
    • Pushgateway from V0.4.0 to V0.7.0
    • Node_exporter from V0.15.2 to V0.17.0
    • Alertmanager from V0.14.0 to V0.17.0
    • Grafana from V4.6.3 to V6.1.6
    • Ansible from V2.5.14 to V2.7.11
  • Add the TiKV summary monitoring dashboard to view cluster status conveniently
  • Add the TiKV trouble_shooting monitoring dashboard to remove duplicate items and facilitate troubleshooting
  • Add the TiKV details monitoring dashboard to facilitate debugging and troubleshooting
  • Add concurrent check for version consistency during rolling updates to improve the update performance
  • Support deployment and operations for TiDB Lightning
  • Optimize thetable-regions.pyscript to support displaying Leader distribution by tables
  • Optimize TiDB monitoring and add latency related monitoring items by SQL categories
  • Modify the operating system version limit to only support the CentOS 7.0+ and Red Hat 7.0+ operating systems
  • Add the monitoring item to predict the maximum QPS of the cluster (hidden by default)
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.