Skip to content

feat(config): add hot-reload extension points (#1619) - #1626

Merged
szbr00 merged 1 commit into
CurvineIO:mainfrom
lzjqsdd:unified-conf-p6
Sep 1, 2026
Merged

feat(config): add hot-reload extension points (#1619)#1626
szbr00 merged 1 commit into
CurvineIO:mainfrom
lzjqsdd:unified-conf-p6

Conversation

@lzjqsdd

@lzjqsdd lzjqsdd commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

Sixth PR of the stacked series for #1619 (6/7). Adds hot-reload extension points only — no watcher or admin RPC is wired yet.

Issue Describe / Design

Related to #1619 (partial). Depends on the preceding stacked PRs.

  • Reloadable marker: sections safe to swap at runtime (first implementation: LogConf).
  • RuntimeOverlay: ephemeral admin-pushed dotted-path overrides, deliberately lost on restart.
  • ConfigHandle: Arc-snapshot holder; readers clone the Arc, so a swap never tears an in-flight consumer. No new dependencies.
  • Module docs describe the two future mechanisms: file-watch reload and admin-API pushdown — both are direct follow-ups since the pipeline is a pure function from layers to a validated ClusterConf.

Changes

Module / File Change Impact on existing behavior
crates/common/curvine-config/src/reload.rs (new) Extension-point types + docs None (no production callers yet)
crates/common/curvine-config/src/lib.rs Export reload module None

Test verified

Test case Result Notes
cargo test -p curvine-config PASS Overlay set/replace/clear; handle swap leaves old snapshots untouched

Dependencies

Comment thread crates/common/curvine-config/src/reload.rs Outdated
Comment thread crates/common/curvine-config/src/reload.rs Outdated
Comment thread crates/common/curvine-config/src/reload.rs Outdated
@lzjqsdd
lzjqsdd force-pushed the unified-conf-p6 branch 3 times, most recently from 3d69037 to e84476a Compare August 26, 2026 06:33
Comment thread crates/common/curvine-config/src/reload.rs Outdated

@szbr00 szbr00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed head c96ee5b against base unified-conf-p5. Dirty crate: curvine-config (reload.rs + lib.rs export).

Previous findings on apply_to error swallowing, LogConf Reloadable, and overlay rank are addressed: apply_to returns CommonResult and the collision test fails closed; LogConf is a documented future candidate only; apply_to and the module Effective layer order match pipeline.rs (file → env → overlay → deserialize).

Inspected overlay set/replace/clear and snapshot isolation tests, the set_dotted collision path, ConfigHandle Arc swap (lock not held after get), no production callers (intentional per #1619), no proto/SDK/lockfile changes, and no data-path impact.

One leftover: RuntimeOverlay / Admin-API docs still say "above the file layer" (see inline). Not blocking.

@lzjqsdd
lzjqsdd changed the base branch from unified-conf-p5 to main September 1, 2026 08:41
@lzjqsdd
lzjqsdd requested a review from szbr00 September 1, 2026 08:52
@szbr00
szbr00 merged commit 85d0b2f into CurvineIO:main Sep 1, 2026
1 check passed
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.

2 participants