清除用于流式引入的架构缓存Clear schema cache for streaming ingestion

群集节点会缓存通过流式引入接收数据的数据库的架构。Cluster nodes cache schema of the databases that receive data via streaming ingestion. 此过程会优化群集资源的性能和利用率,但可能会在架构更改时导致传播延迟。This process optimizes performance and utilization of cluster resources, but can cause propagation delays when the schema change. 清除缓存可确保后续流式引入请求包含数据库或表的架构更改。Clear the cache to guarantee that subsequent streaming ingestion requests incorporate database or table schema changes. 有关详细信息,请参阅流式引入和架构更改For more information, see Streaming ingestion and schema changes.

清除架构缓存Clear schema cache

.clear cache streamingingestion schema 命令从所有群集节点刷新缓存的架构。The .clear cache streamingingestion schema command flushes cached schema from all cluster nodes.

语法Syntax

.clear table <表名称> cache streamingingestion schema.clear table <table name> cache streamingingestion schema

.clear database cache streamingingestion schema.clear database cache streamingingestion schema

返回Returns

此命令返回包含以下列的表:This command returns a table with the following columns:

Column 类型Type 说明Description
NodeIdNodeId string 群集节点的标识符Identifier of the cluster node
状态Status string 成功/失败Succeeded/Failed

示例Example

.clear database cache streamingingestion schema

.show table T1 cache streamingingestion schema
NodeIdNodeId 状态Status
Node1Node1 已成功Succeeded
Node2Node2 已失败Failed

备注

如果命令失败或返回的表中的某一行包含“Status=Failed”,则可以安全地重试该命令。If the command fails or one of the rows in the returned table contains Status=Failed the command can be safely retried.