perf(opcua-acl): #1033 flag-off revalidation answers local items before the pass memo

With Security:Acl:Enabled=false a revalidation pass over local Raw/UNS items is an unconditional allow; it still paid a
(session, ns, id) memo entry and the full Permits walk per item. Measured over 10k items: ~6.5-7 ms and ~1.4 MB per pass
-> ~0.5-1 ms and ~0.2 KB. IsLocalNodeUngated mirrors exactly what Permits concludes there and excludes the one wiring
where it differs (mapped resolver without the projected predicate). The same shortcut inside the per-request Permits was
measured and NOT taken: a 1,000-node flag-off Read stayed ~1.5-1.9 ms either way (SDK read dominates).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-12-03 15:30:13 -05:00
parent 6ea0f09614
commit 7cda8dbb81
3 changed files with 60 additions and 1 deletions
+3 -1
View File
@@ -848,7 +848,9 @@ Behaviours worth knowing before enabling it:
the creation gate's own seam (`Permits` → `AuthorizeIfRequired`), which bypasses local grants — so an
ungranted (e.g. Anonymous) subscription admitted with the flag off is **never** stood down by a tick or a
deploy; only gRPC-data projected / imported-condition items, gated in both modes, can lapse (#972 — between
`8ad03e9c5` and the fix, the pass enforced grants with the flag off). Without the timer a key that expired by the
`8ad03e9c5` and the fix, the pass enforced grants with the flag off). With the flag off a local Raw/UNS item is
answered allow before the pass's memo (#1033: a 10k-item pass ~6.5–7 ms / ~1.4 MB ⇒ ~0.5–1 ms / ~0.2 KB; the same
shortcut in the per-request `Permits` was measured and not taken — a 1,000-node Read did not change). Without the timer a key that expired by the
clock kept streaming until a deployment happened to land — **indefinitely** on a fleet that has been
deployed once and left running, which is exactly the shape a production fleet settles into.