-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Transactions
-
364.533
-
None
-
None
WT-18249 found avoidable alignment padding and standalone booleans that could be folded into flags. Add a presubmit check so new changes do not reintroduce them.
Related PR: https://github.com/wiredtiger/wiredtiger/pull/15128
Scope
- Add a read-only script under dist/ and call it from dist/s_all, following existing diagnostic conventions and supporting changed-file mode where practical.
- Detect avoidable padding in internal in-memory structures from compiler-verified layouts, per architecture and build configuration.
- Report boolean fields that are candidates for flag consolidation. These are review candidates only. The script must not rewrite declarations, change atomic operations, or judge whether packing shared state is safe.
- Report the structure, source location, fields involved, configuration, and potential byte savings.
- Support documented exemptions for on-disk formats, public ABI, shared prefixes (for example WT_BLOCK/WT_BLOCK_DISAGG), explicit cache-line separation, and synchronization or lifetime constraints.
- Scan tracked source only, excluding build trees, compatibility checkouts and virtual environments.
- Use a baseline or equivalent policy so existing intentional exceptions do not hide new findings.
Acceptance criteria
- dist/s_all runs the check and flags newly introduced avoidable padding and boolean-consolidation candidates.
- Tests cover avoidable padding, compact layouts, boolean candidates, exemptions and configuration-dependent layouts.
- Prerequisites, supported configurations, severity and exemption usage are documented, and missing prerequisites are reported explicitly.