mscluster: reuse control buffers and cut per-property allocations (#2673)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-11 13:52:55 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent a8adb6d7bc
commit 930609b0e5
11 changed files with 541 additions and 74 deletions
+6
View File
@@ -32,6 +32,12 @@
the documentation miss this. The parser validates only the structure and
accepts zero padding. `TestDumpPropertyLists` logs real lists as hex when
`WINDOWS_EXPORTER_TEST_CLUSAPI_DUMP` is set on a cluster node.
- Each `Cluster` owns one control buffer (`controlScratch`). Like the handle,
it belongs to the running call, so calls never share it and no `sync.Pool`
is needed. `ParseProperties` returns `Property.Data` slices into it: copy
values out (`copyResourceProperties`, `readCommonProperties`) before the
next control, and never keep a parsed list past that point. `get` zeroes
the bytes, so a reused buffer reads like a new one.
- `clusapi.Open` reports an unconfigured cluster or a missing ClusAPI with
`errors.ErrUnsupported`; the shared collector test treats that as an
unsupported role on hosts where `mscluster` is not a required fixture.