feat: Hot-reload fs per-domain config files - #1225
Merged
Merged
Conversation
The `fs` domain-config driver read its directory once at startup and held it immutably, so an operator's edit to a `keystone.<name>.conf` — including a per-domain `assignment/driver` binding (ADR 0034) — took effect only after a restart, while the DB source already hot-reloads. - `DomainConfigStore` behind an `ArcSwap`; `DomainConfigBackend::reload` re-scans `[identity] domain_config_dir` on a blocking thread and swaps it in, defaulting to a no-op for `sql` (nothing cached). - `ConfigManager` watches `domain_config_dir` when it exists and now also reacts to removals, so an edit or a deletion under it fires the reload notification. - `AssignmentService::rebuild` re-scans the captured `fs` handle before it enumerates the bound domains; a scan error is logged and the last good scan is kept. Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
|
🧪 Tempest Identity Compatibility Results (advisory, non-blocking) rust Failed test IDs |
|
🦢 Load Test Results Goose Attack ReportPlan Overview
Request Metrics
Response Time Metrics
Status Code Metrics
Transaction Metrics
Scenario Metrics
Error Metrics
|
|
| Project | keystone |
| Branch | claude/per-domain-assignments-provider-k0tp5e |
| Testbed | ubuntu-latest |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|
| Command_Serde/apply/remove | 📈 view plot 🚷 view threshold | 229,910.00 ns(-11.40%)Baseline: 259,485.44 ns | 1,311,010.78 ns (17.54%) |
| Command_Serde/apply/set | 📈 view plot 🚷 view threshold | 251,380.00 ns(-40.05%)Baseline: 419,296.16 ns | 3,209,842.62 ns (7.83%) |
| Command_Serde/pack/delete | 📈 view plot 🚷 view threshold | 121.89 ns(+4.15%)Baseline: 117.04 ns | 154.98 ns (78.65%) |
| Command_Serde/pack/delete_index | 📈 view plot 🚷 view threshold | 109.71 ns(+5.10%)Baseline: 104.39 ns | 137.28 ns (79.92%) |
| Command_Serde/pack/set | 📈 view plot 🚷 view threshold | 212.92 ns(+12.18%)Baseline: 189.80 ns | 245.68 ns (86.67%) |
| Command_Serde/pack/set_index | 📈 view plot 🚷 view threshold | 109.31 ns(+4.73%)Baseline: 104.37 ns | 137.64 ns (79.42%) |
| Command_Serde/unpack/delete | 📈 view plot 🚷 view threshold | 199.91 ns(+7.42%)Baseline: 186.10 ns | 270.84 ns (73.81%) |
| Command_Serde/unpack/delete_index | 📈 view plot 🚷 view threshold | 159.74 ns(+3.15%)Baseline: 154.85 ns | 219.27 ns (72.85%) |
| Command_Serde/unpack/set | 📈 view plot 🚷 view threshold | 305.76 ns(+16.24%)Baseline: 263.03 ns | 365.63 ns (83.63%) |
| Command_Serde/unpack/set_index | 📈 view plot 🚷 view threshold | 156.57 ns(+2.68%)Baseline: 152.49 ns | 213.82 ns (73.23%) |
| Payload_encryption/pack/remove_cmd | 📈 view plot 🚷 view threshold | 116.62 ns(+4.84%)Baseline: 111.24 ns | 150.53 ns (77.48%) |
| Payload_encryption/pack/set_cmd | 📈 view plot 🚷 view threshold | 255.11 ns(+28.44%)Baseline: 198.63 ns | 266.76 ns (95.63%) |
| Payload_encryption/unpack/remove_cmd | 📈 view plot 🚷 view threshold | 212.49 ns(+9.13%)Baseline: 194.72 ns | 284.72 ns (74.63%) |
| Payload_encryption/unpack/set_cmd | 📈 view plot 🚷 view threshold | 305.61 ns(+12.44%)Baseline: 271.80 ns | 380.90 ns (80.23%) |
| Raft_1Node_Latency/prefix/1node | 📈 view plot 🚷 view threshold | 1,969,900.00 ns(-35.41%)Baseline: 3,049,870.92 ns | 7,880,083.15 ns (25.00%) |
| Raft_1Node_Latency/read/1node | 📈 view plot 🚷 view threshold | 39,430.00 ns(+5.91%)Baseline: 37,231.41 ns | 52,094.76 ns (75.69%) |
| Raft_1Node_Latency/remove/1node | 📈 view plot 🚷 view threshold | 580,630.00 ns(-49.81%)Baseline: 1,156,778.12 ns | 11,478,702.70 ns (5.06%) |
| Raft_1Node_Latency/write/1node | 📈 view plot 🚷 view threshold | 672,820.00 ns(-30.20%)Baseline: 963,978.12 ns | 7,540,761.93 ns (8.92%) |
| build_snapshot/default | 📈 view plot 🚷 view threshold | 100,900.00 ns(-17.10%)Baseline: 121,715.58 ns | 266,946.38 ns (37.80%) |
| fernet token/project | 📈 view plot 🚷 view threshold | 1,473.00 ns(+4.11%)Baseline: 1,414.82 ns | 1,817.56 ns (81.04%) |
| get_data_keyspace | 📈 view plot 🚷 view threshold | 0.31 ns(-0.45%)Baseline: 0.31 ns | 0.39 ns (80.28%) |
| get_db | 📈 view plot 🚷 view threshold | 0.31 ns(-0.70%)Baseline: 0.31 ns | 0.39 ns (80.06%) |
| get_fernet_token_timestamp/project | 📈 view plot 🚷 view threshold | 147.00 ns(+5.39%)Baseline: 139.48 ns | 181.99 ns (80.77%) |
| get_keyspace | 📈 view plot 🚷 view threshold | 4.36 ns(-24.60%)Baseline: 5.79 ns | 13.03 ns (33.48%) |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
fsdomain-config driver read its directory once at startup andheld it immutably, so an operator's edit to a
keystone.<name>.conf—including a per-domain
assignment/driverbinding (ADR 0034) — tookeffect only after a restart, while the DB source already hot-reloads.
DomainConfigStorebehind anArcSwap;DomainConfigBackend::reloadre-scans
[identity] domain_config_diron a blocking thread and swapsit in, defaulting to a no-op for
sql(nothing cached).ConfigManagerwatchesdomain_config_dirwhen it exists and nowalso reacts to removals, so an edit or a deletion under it fires the
reload notification.
AssignmentService::rebuildre-scans the capturedfshandle beforeit enumerates the bound domains; a scan error is logged and the last
good scan is kept.
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com