# 集群生命周期事件落表 & Prometheus Native Histogram｜Greptime 月度精选 - No. 86

Source: https://greptime.cn/blogs/2026-07-31-greptimedb-monthly-report

## 内容概述

*2026 年 7 月 · 2026-07-01 – 2026-07-31*

本月主要更新：

- 集群 DDL 与运维事件现在会写入 `greptime_private.events` 系统表。
- Prometheus native histogram 在写入、runtime model 和 PromQL 函数三层同时推进。
- SQL 查询、`remote_write` 和 `OpenTelemetry` 写入，现在都会按表级别做权限校验。

7 月 31 日 GreptimeDB 发布了 [v1.2.0-beta.1](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.2.0-beta.1)，这是 v1.2.0 的首个 beta 版本，具体内容见[发布博客](/blogs/2026-08-04-greptimedb-v1-2-0-beta-1-release)，其中 4 项 breaking change 建议升级前逐项确认。本月还发布了 [v1.1.4](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.1.4)、[v1.1.3](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.1.3)、[v1.1.2](https://github.com/GreptimeTeam/greptimedb/releases/tag/v1.1.2) 三个补丁版本。还在用旧版本？[建议升级到最新 release](https://github.com/GreptimeTeam/greptimedb/releases/latest)。

## 贡献者

过去一个月，共有 **20 位贡献者**合并了 **209 个 PR**。 其中 **7 位独立贡献者**贡献了 **10 个 PR**。
欢迎新贡献者：**[@yimeng](https://github.com/yimeng)**、**[@divyansh-1009](https://github.com/divyansh-1009)**、**[@srivtx](https://github.com/srivtx)**！

感谢本月提交代码的社区贡献者：

- **[@raphaelroshan](https://github.com/raphaelroshan)** *[db#8539](https://github.com/GreptimeTeam/greptimedb/pull/8539)* *[db#8484](https://github.com/GreptimeTeam/greptimedb/pull/8484)* *[db#8449](https://github.com/GreptimeTeam/greptimedb/pull/8449)*
- **[@QuakeWang](https://github.com/QuakeWang)** *[db#8481](https://github.com/GreptimeTeam/greptimedb/pull/8481)* *[db#8426](https://github.com/GreptimeTeam/greptimedb/pull/8426)*
- **[@agrawalx](https://github.com/agrawalx)** *[db#8491](https://github.com/GreptimeTeam/greptimedb/pull/8491)*
- **[@divyansh-1009](https://github.com/divyansh-1009)** *[db#8238](https://github.com/GreptimeTeam/greptimedb/pull/8238)*
- **[@lyang24](https://github.com/lyang24)** *[db#8587](https://github.com/GreptimeTeam/greptimedb/pull/8587)*
- **[@yimeng](https://github.com/yimeng)** *[db#8637](https://github.com/GreptimeTeam/greptimedb/pull/8637)*
- **[@srivtx](https://github.com/srivtx)** *[db#8403](https://github.com/GreptimeTeam/greptimedb/pull/8403)*

## PR 亮点

### [db#8648](https://github.com/GreptimeTeam/greptimedb/pull/8648) feat(event-recorder): configure lifecycle event recording

集群生命周期事件现在会写入 `greptime_private.events` 系统表，不再只留在日志里。每行记录事件类型、JSONB 格式的 payload 和时间戳，procedure 驱动的事件另外记录 procedure id、状态和错误信息，“这张表什么时候建的、什么时候改过删过”可以直接用 SQL 查。

本月有多个 PR 扩充了记录范围：库（[db#8623](https://github.com/GreptimeTeam/greptimedb/pull/8623)）、表（[db#8627](https://github.com/GreptimeTeam/greptimedb/pull/8627)）、View（[db#8626](https://github.com/GreptimeTeam/greptimedb/pull/8626)）和 Flow（[db#8632](https://github.com/GreptimeTeam/greptimedb/pull/8632)）的 DDL，以及 repartition（[db#8665](https://github.com/GreptimeTeam/greptimedb/pull/8665)）、WAL prune（[db#8677](https://github.com/GreptimeTeam/greptimedb/pull/8677)）和批量 GC（[db#8673](https://github.com/GreptimeTeam/greptimedb/pull/8673)），加上原有的 region migration 事件。

记录行为可配置：`event_recorder.ttl` 设置 events 表的保留期（默认 `90d`），`event_recorder.event_types` 指定记录哪些类型——省略表示全部记录，设为空数组则关闭记录。

### [db#8382](https://github.com/GreptimeTeam/greptimedb/pull/8382) feat: persist Prometheus remote write v2 native histograms

Prometheus remote write v2 的 native histogram 现在可以解码并落盘，以单个 `greptime_native_histogram` Struct 字段列的形式，存进与普通 sample 相同的指标表。spans、buckets、custom values，以及分开的 int/float count family 都放在这个 Struct 里，哪个 family 有值就代表是哪种 histogram 类型。

读取侧由三个后续 PR 推进：[db#8656](https://github.com/GreptimeTeam/greptimedb/pull/8656) 提供了共享的 runtime model，包含桶对齐、reset 检测和分位数计算；[db#8664](https://github.com/GreptimeTeam/greptimedb/pull/8664) 补上了 PromQL 函数层；[db#8693](https://github.com/GreptimeTeam/greptimedb/pull/8693) 打通了结果返回，native histogram 的 vector 和 matrix 可以通过 HTTP 序列化输出。整个特性按 8 个 PR 的计划推进，目前尚未完成。

### [db#8552](https://github.com/GreptimeTeam/greptimedb/pull/8552) fix: enforce table-aware permissions across query and ingest protocols

查询和写入路径上表级鉴权的缺口补齐了。`INSERT INTO dst SELECT * FROM src` 现在要求同时拥有两张表的权限。`remote_write`、`OTLP`、`InfluxDB` 和日志写入涉及多张表时，会在写入第一批数据前对所有目标表逐一鉴权。

### [db#8624](https://github.com/GreptimeTeam/greptimedb/pull/8624) perf(mito2): make compaction picker asynchronous to avoid blocking the region worker

Compaction picking 原本在 region worker 循环中执行，picker 较慢时会阻塞写入和 DDL。现在 picker 移到后台线程运行，结果通过新增的 `BackgroundNotify::CompactionPickFinished` 消息回传给 worker。

此外修复了一个数据可见性 bug：truncate 与并发 compaction 产生竞争时，compaction 的输出文件在 truncate 后仍然可见。

### [db#8540](https://github.com/GreptimeTeam/greptimedb/pull/8540) feat(json2): support JSON2 nested path fallback reads

读取嵌套路径不再要求 SST 里存有完全对应的那一层。查询要 `a.b.c` 但文件里只有 `a.b` 这个 variant 叶子节点时，reader 会从父节点里解出 `a.b.c`，而不是直接返回空。

配套的 [db#8435](https://github.com/GreptimeTeam/greptimedb/pull/8435) 把 variant 载荷的编码从 serde JSON 字节改成了 jsonb 二进制。另外落地了两条约束：JSON2 列目前只接受 JSON object（[db#8381](https://github.com/GreptimeTeam/greptimedb/pull/8381)），且含 JSON2 列的表必须是 append-only（[db#8434](https://github.com/GreptimeTeam/greptimedb/pull/8434)）。

## 生态更新

### .NET Ingester

本月发布 1 个版本（[v0.3.0](https://github.com/GreptimeTeam/greptimedb-ingester-dotnet/releases/tag/v0.3.0)）。

- `GreptimeClientOptions.KeepAlive`（`KeepAliveOptions`）为所有写入路径新增了可配置的 HTTP/2 gRPC keepalive 支持。
- 长连接保活默认开启：`PingDelay` 30s，`PingTimeout` 10s，`PingWhileIdle` true。
- 空闲连接被负载均衡器、NAT 网关或防火墙静默断开时，现在通过 ping 检测，不再以写入报错的形式暴露。

### Go Ingester

本月发布 2 个版本（[v0.7.4](https://github.com/GreptimeTeam/greptimedb-ingester-go/releases/tag/v0.7.4)、[v0.7.3](https://github.com/GreptimeTeam/greptimedb-ingester-go/releases/tag/v0.7.3)）。

- 所有连接默认开启 `gRPC` keepalive。
- 客户端支持多端点 failover。
- 依赖 `golang.org/x/net` 升级至 `v0.55.0`。
- `github.com/opencontainers/runc` 升级至 `v1.3.6`

### Dashboard

本月发布 4 个版本（[v0.13.10](https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.10)、[v0.13.9](https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.9)、[v0.13.8](https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.8)、[v0.13.7](https://github.com/GreptimeTeam/dashboard/releases/tag/v0.13.7)）。

- 新增快照功能，可以把当前 dashboard 的状态保存下来。
- 只在调整时锁定列宽，不再始终锁定。
- 仪表盘现已内置全部支持的 Perses 插件。
- 虚拟列表日志视图中，隐藏列悬停时会显示提示信息。
- 修复了 PromQL 编辑器查询 header 的问题，以及 Prometheus 插件 `promql` 更新时的 bug。

## Good First Issues

第一次给 GreptimeDB 提 PR？下面这些适合上手。想认领直接在 issue 下留言即可。

### [Issue#7603](https://github.com/GreptimeTeam/greptimedb/issues/7603) Support WITH (timeout/wait) for DDL statements

目前只有 `ALTER TABLE` 的 repartition 支持 `WITH (timeout='...', wait=...)`，其他 DDL 一律提交 procedure 后同步等待完成。需要扩展 parser 和各条 DDL 的提交路径，让 `CREATE`/`DROP`/`TRUNCATE` 以及 View、Flow 都能接受这两个选项，同时把它们与表、库的 options 区分开，避免被当作表属性持久化。issue 里已经按语句拆好了子任务，可以一条 DDL 一条 DDL 地做。

关键词：SQL, DDL, Parser

难度：Medium

### [Issue#8634](https://github.com/GreptimeTeam/greptimedb/issues/8634) Prometheus remote read does not honor custom timestamp and value column names

remote write 已经支持写入时间戳列和值列名字与默认值不同的已有指标表，但 remote read 仍然按 `greptime_timestamp` 和 `greptime_value` 这两个默认名去找列，导致查询无法生成计划或报列不存在。需要改成从表 schema 解析出这两列，把列名一路传到查询规划和结果转换中，并补一个 remote read 的回归测试。

关键词：Prometheus, Remote Read, Query Engine

难度：Medium

## 参与社区

- 文档：https://docs.greptime.cn
- GitHub：https://github.com/GreptimeTeam/greptimedb
- X：https://x.com/Greptime

有问题、bug 或想法都欢迎反馈，提个 issue 或到社区群里聊都行。
