Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2f51c16
refactor(consul)!: adopt typed plugin construction
nick2781 Oct 26, 2026
fc9035a
fix(hash)!: standardize Murmur digests and retain legacy MSVC access
nick2781 Oct 26, 2026
d8b3a61
test(hash): isolate standalone Murmur header checks
nick2781 Oct 26, 2026
b794cfc
test(consul): exercise construction across application jobs
nick2781 Oct 26, 2026
87e24d4
docs(hash): distinguish affected routing consumers
nick2781 Oct 26, 2026
c9bdebe
chore(consul): synchronize preceding merge candidate
nick2781 Oct 26, 2026
5a8b002
chore(hash): synchronize preceding merge candidate
nick2781 Oct 26, 2026
15b0901
docs(consul): publish construction guide in canonical pages
nick2781 Oct 26, 2026
7f2256f
build(deps): bump fast-uri from 3.1.8 to 3.1.9 in /docs/site
dependabot[bot] Oct 26, 2026
3bed670
refactor(proto): remove unused codec scaffolding
nick2781 Oct 26, 2026
53222f8
refactor(hash): remove platform header dependencies
nick2781 Oct 26, 2026
5a4944c
chore(integration): synchronize accepted hash candidate
nick2781 Oct 26, 2026
69af843
chore(hash): synchronize preceding Consul candidate
nick2781 Oct 26, 2026
ab53c06
chore(integration): synchronize preceding plugin changes
nick2781 Oct 26, 2026
9c6b94e
chore(integration): synchronize preceding header cleanup
nick2781 Oct 26, 2026
94009f4
build(deps): combine fast-uri update with Consul validation
nick2781 Oct 26, 2026
40795f8
chore(integration): synchronize preceding merge candidate
nick2781 Oct 26, 2026
2f6cdf4
refactor(etcd)!: replace plugin creation macros
nick2781 Oct 26, 2026
ae9b546
chore(integration): combine preceding cleanup with Etcd construction
nick2781 Oct 26, 2026
d38982c
fix(tests): probe Net DSO listener and peer closure
nick2781 Oct 26, 2026
5c621eb
fix(tests): bound the Net listener shutdown probe
nick2781 Oct 26, 2026
dd02b81
chore(integration): retain the Net listener test fix
nick2781 Oct 26, 2026
37a88f3
chore(integration): include the Net listener test fix
nick2781 Oct 26, 2026
ab1a01c
refactor(osssdk)!: use typed plugin construction
nick2781 Oct 26, 2026
663a4bd
refactor(kafka)!: replace plugin creation macros
nick2781 Oct 26, 2026
c3f1423
chore(integration): combine OSS SDK and Kafka construction
nick2781 Oct 26, 2026
377b504
chore(integration): synchronize OSS SDK merge candidate
nick2781 Oct 26, 2026
fb85954
docs(roadmap): align supported behavior and remaining acceptance
nick2781 Oct 26, 2026
b66d345
fix(buffer)!: transfer receive storage with move-only ownership
nick2781 Oct 26, 2026
6697839
perf(buffer): isolate write capacity preparation
nick2781 Oct 26, 2026
58222d7
chore(integration): synchronize accepted documentation
nick2781 Oct 26, 2026
9923f33
fix(lifecycle): retain libraries after native unload failure
nick2781 Oct 26, 2026
d310173
test(lifecycle): isolate native readiness deadline
nick2781 Oct 26, 2026
1174d56
chore(branch): synchronize tested buffer fixes
nick2781 Oct 26, 2026
39a24a4
docs(database): record real DSO natural-drain acceptance
nick2781 Oct 26, 2026
d2a19bc
chore(branch): synchronize accepted lifecycle fixes
nick2781 Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions docs/guides/database-validation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Database service acceptance

This record separates public-module service/failure checks from positive workflows through actual plugin DSOs. Each scope has its own tested revisions and environment; a passing result applies only to that scope.

## Public modules against real services

The four public service/failure invocations passed on **2026-10-21** using isolated local servers.

| Environment | Value |
Expand All @@ -19,3 +23,43 @@ The four public service/failure invocations passed on **2026-10-21** using isola
| Public failure · MySQL | Passed | Wrong password, untrusted CA, server-observed slow-query timeout and explicit-request recovery |

Both normal workflows also passed host-stack unwinding while requests were pending. Server processes and data were dedicated to these tests; the processes were stopped after completion. Reproduce using the [public service](../../tests/database/README.md#public-modules-against-real-services) and [failure](../../tests/database/README.md#public-real-service-failure-checks) commands. Results cover these functional scenarios on one machine; cross-machine capacity, request cancellation, server termination and dynamic-library unloading require separate acceptance.

## Real plugin DSOs against real services

Both positive modes of `ark_database_public_plugin_service_tests` passed on **2026-10-26**, each with exit code `0`.

| Environment | Value |
| --- | --- |
| Machine | Mac16,11 · Apple M4 Pro · 14 cores · 48 GiB |
| System | macOS 27.0.1 (26A434) · arm64 |
| Build | Apple Clang 21.0.0 · C++20 · Boost.Asio · Debug · OpenSSL 3.6.4 |
| ark | `9923f33b230e052cacceb09bff21f80c95c5027f` |
| arknet | CI pin `a0dfe09cd543e75cfb5996e537ce2fa49f2a758f` |
| Services | Redis 7.4.2 over authenticated TCP; MySQL Community Server 8.4.13 with required TLS, a trusted CA and IP identity verification |

The host loads the actual hidden-symbol Redis or MySQL plugin DSO through the normal manager and uses only public module, manager and task interfaces. It does not link the module implementation objects.

| Program argument | Result | Protocol coverage |
| --- | --- | --- |
| `redis` | Passed · exit `0` | Ordered binary/empty ECHO replies, PING and an explicit follow-up command |
| `mysql` | Passed · exit `0` | Signed/text/NULL query fields, binary prepared results, independent statement-close diagnostics and read-only transaction queries followed by confirmed commit and rollback |

In both workflows, the manager closes top-level task admission while an accepted root is pending before its first owner poll. Real operations and later awaits then finish during natural drain. Every continuation and completion runs on the owner thread/shared executor, the root completes once, and repeated stop succeeds. Owning results remain valid after the database module, manager and runtime are destroyed. No task-cancellation shortcut is used.

The services used independent loopback instances with fresh private data directories and authentication. MySQL had a dedicated schema and SELECT-only account requiring SSL. Both owned processes shut down successfully; private data, authentication files and TLS private keys were removed. The workflows make no key/table writes and do not verify transaction persistence or isolation.

### Reproduce the positive DSO workflows

Prepare isolated services, the `ARK_DATABASE_*` endpoint/authentication variables, a MySQL schema and trusted CA using the [real-plugin service instructions](../../tests/database/README.md#real-plugin-dsos-against-real-services). With the SSL-enabled database build configured:

```sh
cmake --build database-build --target ark_database_public_plugin_service_tests --parallel 1
./database-build/tests/database/ark_database_public_plugin_service_tests redis
./database-build/tests/database/ark_database_public_plugin_service_tests mysql
```

These are standalone C++ test modes. They do not create or stop services; missing configuration or an unavailable protocol fails rather than becoming a successful skip. `check-database` builds this program and its DSOs without running the real-service modes.

## Acceptance boundaries

The DSO workflows exercise normal plugin teardown and native close calls. Successful `FreeLibrary` or `dlclose` does not prove that the operating system physically removed the library image. Request cancellation, server termination, OS image removal, other deployment environments and cross-machine capacity still require separate acceptance. Neither test scope establishes arbitrary hot-update safety or production capacity.
44 changes: 44 additions & 0 deletions docs/guides/database-validation_CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 数据库服务验收

本页分别记录公开模块的真实服务正常/故障检查,以及通过真实插件 DSO 执行的正常流程。每类检查保留各自的测试版本与环境;通过结果仅适用于对应范围。

## 公开模块与真实服务

**2026-10-21**,四组公开接口程序在隔离的本机真实服务上全部通过。

| 环境 | 配置 |
Expand All @@ -19,3 +23,43 @@
| 故障场景 · MySQL | 通过 | 错误密码、不可信 CA、服务端可见的慢查询超时、后续显式请求恢复 |

两种正常流程还验证了请求未完成时的宿主调用栈异常展开。服务进程和数据均为本次测试单独创建,执行后已停止进程。复现方式见[公开接口服务验收](../../tests/database/README_CN.md#公开模块真实服务验收)和[故障场景](../../tests/database/README_CN.md#公开模块真实服务负面验收)的命令。这些结果覆盖单机功能场景;跨机器容量、请求取消、服务端终止及动态库卸载需要单独验收。

## 真实插件动态库与真实服务

**2026-10-26**,`ark_database_public_plugin_service_tests` 的两种正常模式均通过,退出码均为 `0`。

| 环境 | 配置 |
| --- | --- |
| 机器 | Mac16,11 · Apple M4 Pro · 14 核 · 48 GiB |
| 系统 | macOS 27.0.1(26A434)· arm64 |
| 构建 | Apple Clang 21.0.0 · C++20 · Boost.Asio · Debug · OpenSSL 3.6.4 |
| ark | `9923f33b230e052cacceb09bff21f80c95c5027f` |
| arknet | CI 固定版本 `a0dfe09cd543e75cfb5996e537ce2fa49f2a758f` |
| 服务 | Redis 7.4.2:TCP 与密码认证;MySQL Community Server 8.4.13:强制 TLS、可信 CA 与 IP 身份校验 |

宿主通过标准管理器加载真实的隐藏符号 Redis 或 MySQL 插件 DSO,仅使用公开模块、管理器与任务接口,不链接模块实现对象。

| 程序参数 | 结果 | 协议覆盖范围 |
| --- | --- | --- |
| `redis` | 通过 · 退出码 `0` | 有序的二进制/空 ECHO 回复、PING 与后续显式命令 |
| `mysql` | 通过 · 退出码 `0` | 有符号整数、文本与 NULL 查询字段,二进制预处理结果、独立的语句关闭诊断,以及只读事务查询后确认的 commit 和 rollback |

两种流程均在首次所属线程轮询前关闭顶层任务入口,此时已受理的根任务仍待完成。真实操作与后续等待随后在自然排空期间完成。每次协程恢复和完成回调均运行于所属线程与共享执行器;根任务仅完成一次,重复停机成功。数据库模块、管理器与运行时销毁后,拥有型结果仍有效。流程不以任务取消替代排空。

服务为独立的 loopback 实例,使用全新私有数据目录与认证配置。MySQL 使用专用数据库,以及要求 SSL 的只读 SELECT 账户。两个独占进程均成功停止;私有数据、认证文件与 TLS 私钥已删除。流程不写入 key 或表数据,也不验证事务持久性或隔离性。

### 复现真实 DSO 正常流程

按[真实插件服务说明](../../tests/database/README_CN.md#真实插件动态库与真实服务)准备隔离服务、`ARK_DATABASE_*` 端点与认证变量、MySQL 数据库及可信 CA。完成启用 SSL 的数据库构建配置后,执行:

```sh
cmake --build database-build --target ark_database_public_plugin_service_tests --parallel 1
./database-build/tests/database/ark_database_public_plugin_service_tests redis
./database-build/tests/database/ark_database_public_plugin_service_tests mysql
```

这些模式由独立 C++ 程序执行,不创建或停止服务。缺少配置、构建中没有所选协议时,程序返回失败,不会跳过并报告成功。`check-database` 仅构建该程序及其 DSO,不运行真实服务模式。

## 验收边界

DSO 流程覆盖正常插件销毁与原生关闭调用。`FreeLibrary` 或 `dlclose` 成功不证明操作系统已物理移除库映像。请求取消、服务端终止、操作系统库映像移除、其他部署环境与跨机器容量仍需单独验收。这两类检查均不证明任意热更新安全或生产容量。
4 changes: 2 additions & 2 deletions docs/project/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ This page distinguishes supported source behavior from remaining design and depl
- Public [MySQL](../reference/mysql.md) and [Redis](../reference/redis.md) modules use arknet native clients through Asio coroutine entry points. Inputs and results own their storage; manager-owned task groups resume on the module owner thread. MySQL includes prepared statements and transactions; Redis includes commands and pipelines. Legacy database drivers are no longer the public plugin interface.
- Startup callbacks propagate the first failure. The launcher reports the failed phase and exits with code `1` before the update loop. Shutdown stops managed task admission, drains accepted tasks and waits for module readiness. A configured cooperative wait timeout retains the process/resources and disables unloading. These behaviors do not provide partial-startup rollback or a hard process-stop deadline. See [application startup and shutdown](../guides/applications.md) and [managed tasks](../guides/tasks.md).

The four public database service/failure modes passed against isolated Redis and MySQL servers on macOS. The [database service acceptance record](../guides/database-validation.md) identifies the tested revisions, environment and exact scope; those results do not cover every deployment or current source revision.
Public database service/failure checks and the [real-plugin DSO positive workflows](../guides/database-validation.md#real-plugin-dsos-against-real-services) passed against isolated Redis and MySQL servers on macOS. The [database service acceptance record](../guides/database-validation.md) keeps their distinct tested revisions, environments and scope; those results do not cover every deployment or source revision.

## Remaining acceptance and design

| Area | Remaining work and acceptance boundary |
| --- | --- |
| Database deployment | Run separate real-service acceptance for request cancellation, server termination and dynamic-library unloading. Add target-environment and cross-machine capacity evidence before making deployment or capacity claims. Local protocol endpoints and construction checks do not replace these runs. |
| Database deployment | Run separate real-service acceptance for request cancellation, server termination and OS library-image removal. Add target-environment and cross-machine capacity evidence before making deployment or capacity claims. Local protocol endpoints and construction checks do not replace these runs. |
| Startup and shutdown | Partial-startup rollback is not provided. A common dependency-aware shutdown protocol remains design work; managed task drain alone does not prove that arbitrary callbacks, native workers or background cleanup have ended. Define ownership and admission phases before extending unload guarantees. |
| Optional plugins | Kafka construction/export checks do not test broker delivery, flush behavior or service interoperability; its driver build needs independent platform acceptance. OSS SDK remains a scaffold without client/request functionality. Physic retains the explicit unsupported legacy PhysX 3 configuration failure. See [optional plugin boundaries](../reference/directory-structure.md). |
| C++20 modernization | Review each remaining module and optional integration against its own API, build and runtime requirements. The language baseline, header layout and focused construction checks do not establish completion of the whole modernization. |
Expand Down
4 changes: 2 additions & 2 deletions docs/project/roadmap_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
- 公开 [MySQL](../reference/mysql_CN.md) 与 [Redis](../reference/redis_CN.md) 模块通过 Asio 协程入口使用 arknet 原生客户端。输入与结果拥有自身存储;管理器拥有的任务组在模块所属线程恢复。MySQL 提供预处理语句与事务,Redis 提供命令与流水线。旧数据库驱动已不再作为公开插件接口。
- 启动回调的首个失败会向上传递。启动器报告失败阶段,在进入更新循环前以退出码 `1` 终止。停止时关闭托管任务接收,排空已接收任务并等待模块就绪。配置的协作式等待超时会保留进程和资源,并禁止卸载。这些行为不提供部分启动回滚,也不构成强制进程退出期限。见[应用启动与停止](../guides/applications_CN.md)和[托管任务](../guides/tasks_CN.md)。

公开数据库接口的四种正常/故障模式已在 macOS 上通过隔离 Redis 与 MySQL 真实服务验收。[数据库服务验收记录](../guides/database-validation_CN.md)列明测试版本、环境与范围;这些结果不覆盖所有部署环境或当前源码版本。
公开数据库接口的正常/故障检查,以及[真实插件 DSO 正常流程](../guides/database-validation_CN.md#真实插件动态库与真实服务),已在 macOS 上通过隔离 Redis 与 MySQL 真实服务验收。[数据库服务验收记录](../guides/database-validation_CN.md)分别保留各自的测试版本、环境与范围;这些结果不覆盖所有部署环境或源码版本。

## 剩余验收与设计

| 领域 | 剩余工作与验收边界 |
| --- | --- |
| 数据库部署 | 为请求取消、服务端终止和动态库卸载分别执行真实服务验收。发布部署或容量结论前,补充目标环境与跨机器容量证据。本机协议端点与构造检查不能替代这些验收。 |
| 数据库部署 | 为请求取消、服务端终止和操作系统库映像移除分别执行真实服务验收。发布部署或容量结论前,补充目标环境与跨机器容量证据。本机协议端点与构造检查不能替代这些验收。 |
| 启动与停机 | 框架不提供部分启动回滚。通用的依赖感知停机协议仍需设计;托管任务排空不代表任意回调、原生工作线程或后台清理均已结束。扩展卸载保证前,先明确所有权与接收阶段。 |
| 可选插件 | Kafka 构造/导出检查不验证 broker 投递、flush 行为或服务互通;驱动构建仍需独立平台验收。OSS SDK 保持骨架状态,不提供客户端/请求功能。Physic 保留旧版 PhysX 3 不受支持的显式配置失败。见[可选插件边界](../reference/directory-structure_CN.md)。 |
| C++20 改造 | 按各模块与可选集成的 API、构建和运行要求继续审查。语言基线、头文件布局和局部构造检查不足以证明全部改造完成。 |
Expand Down
Loading