# 元信息修复 + PromQL 扩展，社区贡献者持续发力｜Greptime 双周精选

Source: https://greptime.cn/blogs/2025-08-06-biweekly-report-greptimedb

## 内容概述

作为一个成长中的开源项目，GreptimeDB 的进展离不开来自全球的社区贡献者们，感谢各位！

最近的更新内容如下：

- 引入了**元信息修复 Procedure**，用于解决 Metasrv 和 Datanode 之间的元数据差异

- OTLP metrics 输入数据兼容 Prometheus/PromQL

- 提出了关键的 **RFC**：重新分区，兼容性测试框架

- **支持更多的 PromQL 函数**：`absent`，`clamp`，`clamp_min`，`clamp_max`，`pi`，`deg`，`sgn`，`rad`

## 社区贡献者名单

在过去的两周里，GreptimeDB 共合并了 **99 个 PR**，其中有 **6 位独立贡献者**，累计 **10 个 PR** 被成功合并，还有很多待合并的 PR 。

祝贺以下各位在过去 2 周内成为我们最突出的贡献者：

> 注：按照 GitHub 用户名首字母顺序排列
- @[Arshdeep54](https://github.com/Arshdeep54) [db#6422](https://github.com/GreptimeTeam/greptimedb/pull/6422)

- @[Damian972](https://github.com/Damian972) [docs#2003](https://github.com/GreptimeTeam/docs/pull/2003)

- @[linyihai](https://github.com/linyihai) [db#6421](https://github.com/GreptimeTeam/greptimedb/pull/6421)

- @[lyang24](https://github.com/lyang24) [db#6466](https://github.com/GreptimeTeam/greptimedb/pull/6466)

- @[kemingy](https://github.com/kemingy) [db#6634](https://github.com/GreptimeTeam/greptimedb/pull/6634)

- @[yihong0618](https://github.com/yihong0618) [db#6637](https://github.com/GreptimeTeam/greptimedb/pull/6637) [db#6587](https://github.com/GreptimeTeam/greptimedb/pull/6587) [db#6570](https://github.com/GreptimeTeam/greptimedb/pull/6570) [db#6569](https://github.com/GreptimeTeam/greptimedb/pull/6569) [db#6560](https://github.com/GreptimeTeam/greptimedb/pull/6560)

👏 欢迎 @[Damian972](https://github.com/Damian972) @[kemingy](https://github.com/kemingy) 作为新的贡献者加入到社区，并成功合并了 PR，还有更多来自其他独立贡献者的 PR 正在等待合并。

<figure>
<img src="/zh/blogs/2025-08-06-biweekly-report-greptimedb/contributors.png" alt="（图 1：GreptimeDB 双周内新增贡献者）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 1：GreptimeDB 双周内新增贡献者）</figcaption>
</figure>

👏 衷心感谢我们所有的成员和贡献者！是你们的付出让我们的项目得以成功，也是你们让 GreptimeDB 成为一个更优质的产品。让我们一起努力，建立一个更棒的社区！

## PR 亮点

### [db#6634 升级 greptime-sqlparser 避免 SQL 解析时发生栈溢出错误](https://github.com/GreptimeTeam/greptimedb/pull/6634)

通过升级 `greptime-sqlparser` 依赖，修复了 SQL 解析时因 `WHERE` 条件过多导致的栈溢出崩溃，提升了 GreptimeDB 的稳定性。

### [db#6543 使 OTLP 指标与 PromQL 兼容](https://github.com/GreptimeTeam/greptimedb/pull/6543)

OTLP 指标输入数据与 Prometheus 数据模型兼容。我们可以直接将 OTLP 指标用作 Prometheus 指标，通过 PromQL 对 OTLP 指标进行查询。同时，该 PR 也保持向后兼容。

### [db#6529 支持设置更多的数据库选项](https://github.com/GreptimeTeam/greptimedb/pull/6529)

支持设置**数据库级别**的选项，简化建表时的重复配置。例如：

```sql
CREATE DATABASE mydb WITH (
       ttl = '1h',
       'memtable.type'='partition_tree',
       'append_mode'='false',
       'merge_mode'='last_non_null',
       'compaction.type' = 'twcs',
       'compaction.twcs.time_window' = '1h',
       'skip_wal'='true');
```

> 注意： 如果后续建表时设置了同名选项，**表级别的选项会覆盖数据库级别的选项**。

### [db#6584](https://github.com/GreptimeTeam/greptimedb/pull/6584) [#6588](https://github.com/GreptimeTeam/greptimedb/pull/6588) [#6612](https://github.com/GreptimeTeam/greptimedb/pull/6612) [#6613](https://github.com/GreptimeTeam/greptimedb/pull/6613) [#6614](https://github.com/GreptimeTeam/greptimedb/pull/6614) 引入元数据修复 Procedure

引入了元数据修复 Procedure 来协调 Metasrv 和 Datanode 之间的元数据差异。新增了三个 Admin 方法：

- `admin reconcile_catalog(resolve_strategy, parallelism)` ：修复当前 Catalog 所有的表；

- `admin reconcile_database(database_name,resolve_strategy, parallelism)`： 修复当前 Schema 所有的表；

- `admin reconcile_table(table_name,resolve_strategy, parallelism)`：修复指定的表

当数据库的元数据发生异常时，可以尝试使用上面提到的 Admin 方法进行修复。

## Good First Issue

### [Issue#6334 完善 `KILL` 对 `INSERT INTO SELECT` 查询的支持](https://github.com/GreptimeTeam/greptimedb/issues/6334)

- 关键字：查询引擎
- 难度：中等

### [Issue#6621 支持设置 GreptimeDB 的 HTTP 接口及前端资源的子路径](https://github.com/GreptimeTeam/greptimedb/issues/6621)

- 关键字：仪表板， Axum
- 难度： 简单
