> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-fbfa8bee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 仅当此节点运行进程内 ClickHouse Keeper 时，此系统表才会存在。对于 Keeper 日志存储跟踪的每个磁盘上的 Raft 更新日志文件，其中都包含一行记录。

# system.keeper_changelogs

<Info>
  **在 ClickHouse Cloud 中查询**

  此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此，如需查看所有数据的完整情况，需要使用 `clusterAllReplicas` 函数。更多详情请参见[此处](/zh/reference/system-tables/overview#system-tables-in-clickhouse-cloud)。
</Info>

<div id="description">
  ## 描述
</div>

如果此节点未配置为运行进程内 ClickHouse Keeper，则此表不存在。该表为进程内 Keeper 日志存储跟踪的每个 Raft 更新日志文件 (`changelog_<from>_<to>.bin[.zstd]`) 包含一行，其中也包括当前正在追加写入的活动文件。

<div id="columns">
  ## 列
</div>

* `from_log_index` ([UInt64](/zh/reference/data-types/int-uint)) — 文件中的第一个 Raft 日志索引 (含) 。
* `to_log_index` ([UInt64](/zh/reference/data-types/int-uint)) — 文件名所覆盖的最后一个 Raft 日志索引 (含) 。对于活动文件，这是轮转目标，可能会超前于 `last_entry_index`。
* `last_entry_index` ([Nullable(UInt64)](/zh/reference/data-types/int-uint)) — 实际追加到此文件的最大日志索引。如果活动文件尚未接收到任何条目，或者文件已损坏，则为 `NULL`。
* `entries` ([UInt64](/zh/reference/data-types/int-uint)) — 追加到此文件的条目数。是 `ifNull(last_entry_index - from_log_index + 1, 0)` 的 `ALIAS`。
* `path` ([String](/zh/reference/data-types/string)) — 磁盘上的文件路径。
* `disk_name` ([String](/zh/reference/data-types/string)) — 存放该文件的磁盘名称。
* `size_bytes` ([UInt64](/zh/reference/data-types/int-uint)) — 文件在磁盘上的大小。
* `modification_time` ([DateTime](/zh/reference/data-types/datetime)) — 文件的最后修改时间。
* `is_compressed` ([Bool](/zh/reference/data-types/boolean)) — 文件载荷已使用 zstd 压缩。
* `active` ([Bool](/zh/reference/data-types/boolean)) — 当前正在向该文件追加内容。
* `is_broken` ([Bool](/zh/reference/data-types/boolean)) — 启动时发现末尾记录已损坏。

示例：

```sql theme={null}
SELECT from_log_index, to_log_index, entries, path, active FROM system.keeper_changelogs ORDER BY from_log_index;
```

```text theme={null}
┌─from_log_index─┬─to_log_index─┬─entries─┬─path───────────────────────────┬─active─┐
│              1 │         1000 │    1000 │ changelog_1_1000.bin.zstd      │ false  │
│           1001 │         2000 │     537 │ changelog_1001_2000.bin.zstd   │ true   │
└────────────────┴──────────────┴─────────┴────────────────────────────────┴────────┘
```
