Skip to content

zig: split storage compilation to bound Darwin release memory - #536

Open
ajroetker wants to merge 152 commits into
mainfrom
codex/pr450-main-integration
Open

zig: split storage compilation to bound Darwin release memory#536
ajroetker wants to merge 152 commits into
mainfrom
codex/pr450-main-integration

Conversation

@ajroetker

Copy link
Copy Markdown
Contributor

Summary

  • supersedes Reduce Zig ReleaseFast runtime codegen graph #450 by integrating its compilation-boundary work with current main in one replacement PR
  • moves the physical storage graph into a dedicated antfly-storage-kernel static archive and keeps control, API, inference, enrichment, and serverless units on contract-only roots
  • extends the cross-archive ABI for current-main query, cancellation, metadata projection, data-Raft protocol, and document-enrichment behavior
  • gives Darwin storage an 18 GiB scheduler claim and deterministic dependency gates under the 20 GiB aggregate release budget, while retaining useful overlap between independent units
  • enables the split in the real release packaging path and preserves the existing ARM64 LLVM-allocation retry as a fallback

Motivation

The Darwin ARM64 ReleaseFast storage compile in run 32651701261 / job 97224216605 aborted in LLVM with an out-of-memory allocation failure. The previous monolithic compilation graph combined physical storage with broad product/runtime codegen, and its scheduler claim allowed aggregate pressure from neighboring units.

This keeps ReleaseFast and stripping enabled. It reduces the graph owned by each LLVM process and uses measured scheduler reservations to prevent concurrent jobs from consuming storage headroom.

Validation

  • Darwin ARM64 ReleaseFast antfly + capi, stripped, Metal/Accelerate enabled, completed under a 20 GiB bounded Zig scheduler
  • full linked Debug antfly build completed with the split enabled
  • storage owner boundary: 112/112 passed
  • provisioned source boundary: 7/7 passed
  • data runtime boundary: 23/23 passed
  • metadata runtime boundary: 8/8 passed
  • enrichment compute boundary: 7/7 passed
  • max-RSS runner tests: 15 passed
  • storage shard audit tests: 11 passed
  • git diff --check and release-script shell syntax passed

ajroetker and others added 30 commits August 5, 2026 13:26
…m64-bad-alloc

# Conflicts:
#	zig/pkg/antfly/src/standalone/runtime.zig
…gration

# Conflicts:
#	scripts/packaging/build_zig_release_archive.sh
#	zig/build.zig
#	zig/pkg/antfly/src/runtime_artifact_lib.zig
…gration

# Conflicts:
#	zig/build.zig
#	zig/pkg/antfly/src/api/table_reads.zig
#	zig/pkg/antfly/src/metadata/runtime.zig
#	zig/pkg/antfly/src/metadata/service.zig
#	zig/pkg/antfly/src/metadata/table_provisioner.zig
#	zig/pkg/antfly/src/standalone/runtime.zig
#	zig/pkg/antfly/src/storage/db/catalog/index_manager.zig
#	zig/pkg/antfly/src/storage/db/enrichment/enrichment_runtime.zig
#	zig/pkg/antfly/src/storage/db/query/search_exec.zig
…gration

# Conflicts:
#	zig/build.zig
#	zig/pkg/antfly/src/api/table_writes.zig
…gration

# Conflicts:
#	zig/build.zig
#	zig/pkg/antfly/src/api/distributed_txn.zig
#	zig/pkg/antfly/src/api/linear_merge.zig
#	zig/pkg/antfly/src/api/table_reads.zig
#	zig/pkg/antfly/src/api/table_writes.zig
#	zig/pkg/antfly/src/data/runtime.zig
#	zig/pkg/antfly/src/storage/db/db.zig
#	zig/pkg/antfly/src/storage/db/enrichment/enrichment_runtime.zig
#	zig/pkg/antfly/src/storage/ha/seed_materialization.zig
…gration

# Conflicts:
#	zig/pkg/antfly/src/api/table_reads.zig
#	zig/pkg/antfly/src/metadata/storage/raft_apply_store.zig
#	zig/pkg/antfly/src/standalone/runtime.zig
#	zig/pkg/antfly/src/storage/db/db.zig
#	zig/pkg/antfly/src/storage/db/enrichment/enrichment_runtime.zig
…gration

# Conflicts:
#	zig/pkg/antfly/src/api/table_writes.zig
…gration

# Conflicts:
#	zig/e2e/antfly/test_cdc.py
#	zig/pkg/antfly/src/api/backups.zig
#	zig/pkg/antfly/src/api/distributed_join.zig
#	zig/pkg/antfly/src/api/http_server.zig
#	zig/pkg/antfly/src/api/stored_destination_authorization.zig
#	zig/pkg/antfly/src/api/table_writes.zig
#	zig/pkg/antfly/src/runtime_artifact_lib.zig
#	zig/pkg/antfly/src/serverless/api/http_handler.zig
#	zig/pkg/antfly/src/storage/db/db.zig
@ajroetker ajroetker added this to the v0.3.0 milestone Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:darwin-release Run the opt-in Darwin ARM64 ReleaseFast packaging diagnostic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants