Repository navigation
Releases: Luo-root/pulse-durable
Release list
Pulse Durable v0.1.0 — checkpointed execution and recovery
中文
Pulse Durable 为 Pulse 工作流提供检查点保存与进程退出后的恢复。本次为首次正式版本,要求 Go 1.26+,使用 Pulse v0.5.0。
主要能力
- 显式 Run / Resume,稳定 RunID、业务 Version 和 Codec 兼容性校验。
- 完整节点链的检查点确认后才向下游发布普通输出;恢复复用有效作用域内已确认成果,未确认节点从函数开头重新执行。
- 静态子图与持久 Retry 尝试身份、索引及剩余预算恢复。
- 受管流消息、确认游标、显式消息状态和消息输出的可靠提交与恢复。
- MemoryStore、本机 filestore,以及独立可选的 SQLite 和 PostgreSQL 后端。
- 持久记录可通过独占 Session.Load 读取;recordio 解析记录容器,业务数据由相应 Codec 解释。运行期瞬时值仍属于 Pulse,不提供实时变量查询服务。
数据库后端
SQLite 使用 pure-Go modernc.org/sqlite v1.60.1,内嵌 SQLite 3.53.4;采用 WAL/FULL、短事务 CAS、本机 RunID OS 锁和完整记录 BLOB。
PostgreSQL 使用 pgx/v5 v5.11.0 与 pgxpool;Session 在单条连接上持有 advisory lock,短事务完成 Revision CAS,记录为 BYTEA,Revision 为十进制 TEXT。池/网络等待不占 Store 互斥锁;关闭取消在途获取,不确定锁状态的连接销毁而不归还池。同 Store 的 held/pending RunID 快速 Busy;跨 Store 检测依赖连接和网络,总获取默认最多 30 秒,较短调用方 deadline 优先。
两个后端当前 go.mod 依赖真实公开父模块版本 v0.0.0-20261023040750-1b397e91c878,无本地 replace;这不是不存在的占位版本。根 v0.1.0 与两个后端一同安装时,Go MVS 会选择根 v0.1.0。
安装
go get github.com/Luo-root/pulse-durable@v0.1.0
# 按需选用数据库后端:
go get github.com/Luo-root/pulse-durable/sqlitestore@v0.1.0
go get github.com/Luo-root/pulse-durable/postgresstore@v0.1.0- 安装与版本:https://luo-root.github.io/pulse-durable/guide/installation.html
- SQLite 教程:https://luo-root.github.io/pulse-durable/guide/sqlite.html
- PostgreSQL 教程:https://luo-root.github.io/pulse-durable/guide/postgresql.html
- 恢复与边界:https://luo-root.github.io/pulse-durable/guide/recovery.html
保证与限制
- 不保存 Go 调用栈,不提供 deterministic replay、分布式任务派发、租约/fencing 或自动接管。
- 未确认节点的外部副作用可能重复,需宿主幂等、去重、业务事务或 outbox。
- Save 返回错误可能已经提交;停止本次执行,释放所有权后重新 Load 权威记录,不用旧快照盲目覆盖或重试。
- filestore/SQLite 仅面向本机;PostgreSQL advisory lock 不是完整分布式所有权协议。
- 检查点不是加密容器;权限、备份和保留策略由宿主管理。断电与备份恢复演练未作为本轮已验收保证。
- 未重新测量完整性能矩阵。历史报告及失败/超时状态保留,不把正确性通过等同于全性能实验成功。
已执行检查
最终 main 的跨平台 CI、PostgreSQL16 实库测试和双语站点构建/部署通过。新数据库教程的原样程序由 CI 抽取:SQLite Linux/Windows 和 PostgreSQL16 均完成首次提交后退出、第二进程 Resume、第三进程重复 Resume 检查。历史测试与性能采样内容未改写。
正式 tag 的公开安装与消费者检查将在发布后执行。
English release notes
Pulse Durable v0.1.0 is the first stable release of checkpointed execution and recovery for Pulse workflows. It requires Go 1.26+ and uses Pulse v0.5.0.
- Explicit Run / Resume with stable run identity, business-version checks and Codec compatibility.
- Confirm-before-publish node checkpoints; confirmed results are reused, while unconfirmed node bodies restart from the beginning.
- Static subgraphs, persistent Retry identities/budgets, managed streams, message acknowledgement, cursors and explicit message state.
- MemoryStore, local filestore, and independent optional SQLite/PostgreSQL modules.
- Read persisted RunRecords through Session.Load; recordio handles the record container and business Codecs interpret payload bytes.
SQLite uses modernc.org/sqlite v1.60.1 / SQLite 3.53.4, WAL/FULL, short CAS transactions and local OS run locks. PostgreSQL uses pgx/v5 v5.11.0 / pgxpool, connection-scoped advisory locks, short CAS transactions and BYTEA records. Acquisitions do not hold the Store mutex while waiting for pool capacity or network operations; Close cancels pending acquisitions and uncertain lock connections are discarded.
All three module tags target commit 532bced. Backend modules retain a real publicly resolvable root-module pseudo-version, without local replacements; installing root v0.1.0 alongside a backend selects root v0.1.0 through Go MVS.
This release does not promise exactly-once external effects, deterministic replay, distributed leases/fencing, dispatch or automatic failover. Save errors can indicate uncertain commit outcomes: stop the execution and reload authoritative state before deciding how to recover. Host permissions, backups, retention and external-effect idempotency remain host responsibilities.
Final-main CI, cross-platform tests, PostgreSQL16 integration checks, documentation builds and exact tutorial recovery programs passed. Formal-tag public download and consumer verification are post-publication checks and are not claimed in advance.