Repository navigation
arknet 0.2.1
arknet 0.2.1
This release improves shutdown reliability for database clients and TCP-based protocols, and adds application-driven IO execution.
Features
- MySQL connections, Redis clients and both pools provide
close_and_wait(): permanent closure rejects new requests and waits for accepted operations and callbacks. Retained leases and statement handles become inert. manual_runtimelets application update loops drivepoll(), with a standard Asio executor forawaitableandco_spawn. Dedicated coroutine protocol APIs remain TODO.
Fixes
- TCP, TLS TCP, HTTP and WebSocket shutdown waits cover outstanding IO and callbacks, preventing premature resource release and long timer rearming. Explicit restart and normal reconnect remain available.
- Fix database-pool shutdown while requests are waiting for connections. Redis pools preserve diagnostics and recover capacity after lease-return submission failures, without replaying commands or changing successful results.
Upgrade notes
Stop application producers before waiting; keep external contexts running until completion. Network shutdown does not establish business-task drainage, plugin unload safety or deployment capacity. See lifecycle and validation.
Performance note: the five-second comparison records 6.51% lower median throughput and 13.29% higher P99 for 4 KiB WebSocket. Five-run throughput ranges overlap; cause is unconfirmed. Measurements use 2aa5bc0, before the final pool-shutdown correction.
Release source: 7685e241.
中文
此版本完善数据库客户端与 TCP 系列协议的关闭等待,并提供由应用驱动的 IO 执行方式。
新增能力
- MySQL 连接、Redis 客户端及两者的连接池提供
close_and_wait():永久关闭后停止受理新请求,等待已受理操作与回调结束;保留的租约和语句句柄失效。 manual_runtime允许应用在更新循环中调用poll(),并提供支持awaitable与co_spawn的标准 Asio 执行器。公共协议的专用协程接口仍为 TODO。
修复
- TCP、TLS TCP、HTTP 和 WebSocket 关闭时等待未完成的 IO 与回调,避免提前释放资源,关闭期间不能重新设置长定时器。显式重启和正常重连保留。
- 修复仍有请求等待连接时的数据库连接池关闭问题。Redis 连接池归还任务投递失败时保留诊断并恢复额度,不重放命令或改写成功结果。
升级注意
等待关闭前,需要停止应用生产者,并保持外部 context 运行至关闭完成。网络关闭不保证业务任务已排空、插件可以安全卸载或部署容量,详见生命周期与验证记录。
性能说明:5 秒负载对照中,4 KiB WebSocket 的吞吐中位数下降 6.51%,P99 上升 13.29%;五轮吞吐范围重叠,原因尚未确认。测量使用 2aa5bc0,早于最后的连接池关闭修复。
发行源码:7685e241。
Downloads / 下载
Raw measurements and validation logs remain release attachments. / 原始测量与验证日志保留为 Release 附件。
| Archive / 归档 | SHA256 |
|---|---|
| arknet-0.2.1-benchmark-comparison.tar.gz · SHA256 file | 1087dab17d8a8a48d0c5c4b5427cf97bd7b5eb48679a46f14e0550149c32f324 |
| arknet-0.2.1-validation-logs.tar.gz · SHA256 file | 6fa4368dc4f0b1d9e8171a6cd1e229bf783148809bb2c345b35fa8884fc17a14 |