TDengine is a distributed time-series database designed for high-performance data ingestion, storage, and real-time analytics. This document provides an overview of the system architecture, core components, and their interactions within the codebase.
The system supports SQL queries, schemaless data ingestion, stream processing, and distributed cluster management. For specific implementation details of individual components, see the architecture section (2) and subsystem-specific pages (3 through 10).
TDengine serves as a complete time-series data platform with the following primary functions:
Sources: source/libs/parser/src/parTranslater.c1-100 source/libs/executor/src/scanoperator.c1-50 source/dnode/vnode/src/tq/tq.c1-50 include/common/tmsg.h1-100 source/common/src/tglobal.c1-50
The system implements a layered architecture where each component has specific responsibilities:
Sources: source/libs/planner/src/planOptimizer.c1-50 source/libs/executor/src/executil.c1-50 source/dnode/vnode/src/tsdb/tsdbCommit.c1-50 source/client/src/clientMain.c1-50 source/dnode/mnode/impl/src/mndDnode.c1-50
TDengine processes data through multiple pathways depending on the operation type:
Sources: source/client/src/clientImpl.c291-340 source/libs/parser/src/parTranslater.c421-500 source/dnode/vnode/src/tq/tq.c380-464 source/dnode/vnode/src/tsdb/tsdbRead2.c1-100
The management node handles cluster-wide metadata and coordination:
mndDb.c
and mndStb.c
mndDnode.c
mndTrans.c
Virtual nodes handle data storage and query processing:
executor.c
and operator implementationstsdb.h
, tsdbCache.c
)Stream nodes provide real-time data processing capabilities:
tq.c
implementationThe system implements comprehensive error management:
taoserror.h
with over 500 error typesterror.c
Sources: source/dnode/mnode/impl/inc/mndDef.h1-100 source/dnode/vnode/src/inc/tsdb.h1-200 include/util/taoserror.h1-100 source/util/src/terror.c24-50
TDengine maintains extensive configuration management through a centralized system:
tglobal.c
The configuration system supports over 200 parameters covering performance tuning, resource allocation, security, and operational settings.
Sources: source/common/src/tglobal.c36-100 source/common/src/tglobal.c400-500
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.