Skip to content

feat(runtime-broker): retention for terminal JDBC rows — bindings/sessions/executions grow without bound #13203

Description

@wenshao

What happened?

There is no DELETE anywhere in packages/sdk-java/runtime-broker/src/main: terminal bindings, sessions, and executions accumulate forever. Beyond storage growth, placement recovery scans and AES-GCM-decrypts every historical LOST/RECOVERY_BLOCKED/OPERATOR_RECOVERY/FAILED row of the tenant (JdbcRuntimeBindingRepository.java:602-616, 822-846), so placement gets slower and more CPU-bound as the tables age.

Split out from #13183 (medium cluster).

What did you expect to happen?

A retention job that deletes terminal rows past a configurable age — e.g. RELEASED/FAILED bindings and their RELEASED sessions and SETTLED/ABANDONED executions older than N days — in bounded batches, off the request path. Rows still referenced by operator-recovery or publication flows must be excluded.

Client information

N/A — code audit finding.

中文

发生了什么?

packages/sdk-java/runtime-broker/src/main 里没有任何 DELETE:终态的 binding、session、execution 行无限累积。除了存储增长,placement 恢复还会扫描并逐行 AES-GCM 解密该租户全部历史的 LOST/RECOVERY_BLOCKED/OPERATOR_RECOVERY/FAILED 行(JdbcRuntimeBindingRepository.java:602-616, 822-846),表越老,placement 越慢、越耗 CPU。

拆自 #13183 的 Medium 簇。

期望行为

一个保留作业:按可配置年龄删除终态行(如超过 N 天的 RELEASED/FAILED binding 及其 RELEASED session 与 SETTLED/ABANDONED execution),分批有界、不在请求路径上执行;仍被 operator-recovery 或 publication 流程引用的行必须排除。

客户端信息

N/A —— 代码审计发现。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions