# 社区新晋 Advocator 官宣！Pipeline 支持日志过滤功能，Flow 稳定性持续提升｜Greptime 双周精选

Source: https://greptime.cn/blogs/2025-07-23-biweekly-report-greptimedb

## 内容概述

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

最近的更新内容如下：
- Pipeline 支持过滤日志
- 支持通过 `SELECT @@max_execution_time` 获取当前会话的查询超时时间
- 优化 Prometheus `query_range` 兼容接口的使用体验
- 提高 Flow 任务的稳定性

## 社区贡献者名单

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

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

- @[codephage2020](https://github.com/codephage2020) [db#6517](https://github.com/GreptimeTeam/greptimedb/pull/6517) [db#6511](https://github.com/GreptimeTeam/greptimedb/pull/6511)
- @[yihong0618](https://github.com/yihong0618) [db#6559](https://github.com/GreptimeTeam/greptimedb/pull/6559)
- @[zqr10159](https://github.com/zqr10159) [greptimedb-ingester-java#90](https://github.com/GreptimeTeam/greptimedb-ingester-java/pull/90) 

🎆 热烈欢迎 GreptimeDB 第二位布道师 @[yihong0618](https://github.com/yihong0618) 正式加入社区！他将深度参与 GreptimeDB 的技术布道、社区推广和开发者生态建设，与社区一起共同推动项目的成长和普及！

<figure>
<img src="/zh/blogs/2025-07-23-biweekly-report-greptimedb/greptimedbadvocator.png" alt="（图 1：GreptimeDB Advocator 宣布）" style="width: 80%; margin: 0 auto"/>
<figcaption>（图 1：GreptimeDB Advocator 宣布）</figcaption>
</figure>

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

## PR 亮点

### [db#6502 Pipeline 支持过滤数据](https://github.com/GreptimeTeam/greptimedb/pull/6502)

Pipeline 增加了 Filter 处理器用于过滤日志。用户可以通过该处理器过滤掉不需要的日志。
以下示例展示了只保留包含 `John` 日志的操作：

```yaml
processors:
  - date:
      field: time
      formats:
        - "%Y-%m-%d %H:%M:%S%.3f"
  - filter:
      field: name
      targets: 
        - John
transform:
  - field: name
    type: string
  - field: time
    type: time
    index: timestamp
```

Filter Processor 接受以下参数

1. `field`（或者 `fields`）：需要对比的参数，可以是一个或者多个；任意一个变量匹配即满足条件，执行过滤；
2. `mode`（可选）：默认为 `simple`，即为简单字符串匹配。字段用于后续扩展使用；
3. `match_op`（可选）：如果模式为 simple，这里可以设置 `in` 或者 `not_in`。默认是 `in`；
4. `case_insensitive`（可选）：默认为 `true`；
5. `targets`：用于比较的目标字符串列表。

### [db#6511](https://github.com/GreptimeTeam/greptimedb/pull/6511) [db#6517](https://github.com/GreptimeTeam/greptimedb/pull/6517) 支持通过查询系统变量的方式获取 `max_execution_time` 的值

现在可以通过 `SELECT @@max_execution_time` 或者 `SELECT @@session.max_execution_time` 语句获取当前 session 的查询超时时间：

```json
SET max_execution_time = 9000;

SELECT @@max_Execution_time;

+----------------------+
| @@max_execution_time |
+----------------------+
| 9000                 |
+----------------------+
```

### [db#6474 对 `range_query` API 的结果排序再返回，优化用户 Grafana 使用体验](https://github.com/GreptimeTeam/greptimedb/pull/6474)

此前 GreptimeDB 在 Prometheus `range_query` API 默认不对结果进行排序。如果 Grafana 面板的 PromQL 涉及 Binary operator，用户可能会遇到图表显示不一致的问题。这时，用户需要手动在 Grafana 上为面板增加排序的 `Transform`。现在 GreptimeDB 会默认对结果进行排序。

### [db#6538](https://github.com/GreptimeTeam/greptimedb/pull/6538) [db#6495](https://github.com/GreptimeTeam/greptimedb/pull/6495) [db#6551](https://github.com/GreptimeTeam/greptimedb/pull/6551) 修复 Flow 若干问题，提升 Flow 服务的稳定性

- 优化了任务的重试逻辑；
- 修复地址缓存更新的问题；
- 优化窗口计算的效率。

## Good First Issue

### [Issue#5956 在 Metasrv 中支持 etcd 的 TLS 安全连接](https://github.com/GreptimeTeam/greptimedb/issues/5956)

Metasrv 支持将集群元数据存储在 etcd 中，但目前尚未支持通过 TLS 安全连接访问 etcd，本 issue 的目标是支持此特性以提升集群的安全性。
- 关键字：etcd、Metasrv、TLS
- 难度：中等
