Skip to content

test(database): verify real plugin request cancellation - #167

Merged
nick2781 merged 38 commits into
mainfrom
test/database-dso-cancellation
Oct 26, 2026
Merged

nick2781 merged 38 commits into
mainfrom
test/database-dso-cancellation

Conversation

@nick2781

Copy link
Copy Markdown
Member

Add an opt-in C++ acceptance program that loads the real Redis/MySQL plugin libraries through public interfaces and requests cancellation only after the server reports an active blocking operation. Verify native cancelled results, unknown-outcome flags, exactly-once owner-thread completion, explicit recovery, retirement, natural stop and owning-result lifetime. The counter checks cover the observed requests/effects; MySQL cancellation is not treated as rollback.

Wire compilation into check-database and document standalone execution in English/Chinese. The canonical acceptance report and roadmap record the exact locally executed source, machine and service versions. CI compiles the program; real services are tested locally with private authenticated loopback instances and trusted MySQL TLS.

Local validation:

  • Real plugin-library Redis 7.4.2 and MySQL 8.4.13 cancellation modes passed at dba3476 with CI-pinned arknet a0dfe09c. Both counters ended at 1; both owned services exited normally and private data/credentials/keys were removed.
  • Standalone Asio 1.38.2 with TLS disabled compiled the new runner and Redis plugin. This is compile coverage, separate from the Boost.Asio real-service runs.
  • 157 CI policy tests and clang-format 18 passed. Bilingual Nimbus, links and emitted article/Markdown checks are included in the delivery evidence.

The controlled tests completed natural shutdown within their own observation bounds. The existing cooperative shutdown semantics provide no hard/preemptive production deadline. Service termination, transaction cancellation, every retry race, Redis TLS, physical image removal, other-platform real services and capacity remain separate acceptance work. Raw evidence stays local.

nick2781 and others added 30 commits October 26, 2026 09:25
Replace Consul creation macros with typed bases, a private owning factory and explicit DLL entry points. Preserve interface registration, disabled updates and request behavior, and add construction/lifecycle checks with bilingual migration guidance.

BREAKING CHANGE: Consul implementation and plugin class layouts change. Rebuild Consul and its consumers together; all existing public types and logical header paths remain available.
Read hash blocks and write digest bytes without alignment or aliasing assumptions. Use C++20 rotations and provide explicit legacy MSVC methods for persisted-key migration.

BREAKING CHANGE: default MurmurHash3 now uses canonical little-endian blocks and output. Old MSVC IDs, shard mappings and persisted keys require an explicit migration or the matching legacy MSVC method.
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](fastify/fast-uri@v3.1.8...v3.1.9)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
# Conflicts:
#	docs/reference/utility.md
#	docs/reference/utility_CN.md
#	src/core/hash/murmur_hash.hpp
#	tests/core/README.md
#	tests/core/README_CN.md
Use typed module and plugin bases with a private interface-returning factory and explicit entry points. Retain every public header, default plugin selection and existing Etcd request implementation. Add factory, ownership and production DSO checks to Applications acceptance.

BREAKING CHANGE: etcd_client_module_impl and etcd_client_plugin have changed public class layouts. Rebuild Etcd Client and all consumers together; existing interfaces and logical header paths remain available.
Resolve the duplicated Consul history by retaining the preceding integration tree plus the exact Etcd feature delta. Preserve the independent hash-header check, codec cleanup and all typed plugin construction coverage.
Check a successful live-listener negative control, retain the exercised TCP peer across manager shutdown, and require a remote EOF or reset before stopping that peer. Check listener closure using an exact refused new connection instead of global immediate port rebinding.

Keep existing endpoint ownership, manager state, main-thread callbacks and pending HTTP cancellation assertions. The original macOS CI bind conflict holder was not reproduced locally; no production shutdown or reuse-address behavior changes.
Use a private io_context, async_connect and the existing five-second deadline. Cancel and close the probe socket on expiry, return typed timed_out rather than operation_aborted, and drain connect and timer callbacks before returning.

Keep all live-listener, retained-peer and owner-state assertions and the existing test timeout. Production shutdown remains unchanged.
Retain public OSS SDK headers and types while replacing creation macros with
module_base, an interface-returning private factory, plugin_base and explicit
entry points. Replace the undefined deregistration call with typed owned
unregistration while preserving the interface key and disabled updates.

Add real-factory assembly and controlled DSO lifecycle regressions, production
export checks and bilingual migration guidance. Keep the optional plugin off by
default and retain its TODO capability boundary.

BREAKING CHANGE: oss_sdk_module_impl and oss_sdk_plugin change public class
layouts. Rebuild OSS SDK and all affected consumers together; original public
header paths, types and the oss_sdk_module interface remain available.
Use typed module/plugin bases, a private interface-returning factory and explicit DLL entries while preserving enabled updates and RdKafka callback inheritance. Add real factory/assembly, controlled lifecycle and production export checks. Cast callback log enums to integers for current fmt compatibility.

BREAKING CHANGE: Kafka implementation and plugin public class layouts change. Rebuild Kafka and its C++ consumers together; retained public headers, interface keys and producer behavior remain available.
Retain both typed module migrations, their public header contracts and independent disabled/enabled update selections. Preserve original production and permanent test sources while resolving shared bilingual guidance and core test wiring.
Own the receive array with a private unique_ptr deleter, prohibit shallow copies
and transfer allocation/cursor state through noexcept moves. Leave moved-from
buffers empty and reusable, preserve self-move, capacity growth and throwing
allocation behavior, and route growth through matching configured array hooks.

Reject out-of-range consumption and avoid null-pointer operations for empty
writes and storage. Add permanent ownership, framing-state, deterministic
allocation-failure and isolated custom-hook regressions with bilingual guidance.

BREAKING CHANGE: ark::buffer no longer supports copy construction or copy
assignment and its private storage representation changes. Use explicit moves
for ownership transfer and rebuild affected Core/Net consumers and plugins
together. Define compatible ARK_NEW_ARRAY/ARK_DELETE_ARRAY overrides consistently;
growth now uses the same hook pair as construction and destruction.
Move compaction and growth preparation into a private helper behind the C++20
unlikely branch for insufficient tail space. Keep allocation and exception
handling off the steady receive-write path without changing any ownership,
bounds, hook or failure contract.

AppleClang Release disassembly moves grow out of the framing loop and reduces
the local benchmark's parse_frames body from 335 to 270 instructions. The
bounded timing comparison remains separate evidence and is retained locally.
Observe tagged Redis and MySQL operations on owned servers before cancelling
through task_group::cancel(id). Retain native cancelled/unknown outcomes,
owner-thread exactly-once completion, explicit recovery and natural shutdown.
Check exclusive counters only after server retirement to reject implicit write
replay without treating cancellation as rollback.

Compile the opt-in public-interface DSO runner with database checks without
starting services in CI. Document the isolated-service requirements and precise
acceptance boundaries in English and Chinese.
@nick2781
nick2781 added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 4416956 Oct 26, 2026
6 checks passed
@nick2781
nick2781 deleted the test/database-dso-cancellation branch October 26, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant