Consolidate table option definitions into a single authoritative registry within
ETSOwner, eliminating scattered @table_opts declarations across consumer modules.
Key changes:
- Replace @tables list with a map keyed by table name for O(1) lookup
- Simplify ensure_table/2 to ensure_table/1, deriving options internally
- Add table_opts!/1 to validate table names against the known registry
- Raise ArgumentError for unknown table names to catch misconfiguration early
- Require ETSOwner to be running before table creation, preventing orphaned
tables from ad-hoc process creation
- Improve race condition handling in create_table/2 by re-raising ArgumentError
only when the table genuinely doesn't exist after rescue
Consumer module updates:
- TaintRegistry and ZeroCopy now delegate fully to ETSOwner for table config
- Removed redundant @table_opts module attributes from both modules
Testing:
- Add validation test for known vs unknown table rejection
- Add concurrent ensure_table stress test with 20 parallel tasks
Documentation:
- Correct supervisor tree diagram to reflect ApplicationCleanup shutdown order