code wiki / _hdl_build / nx_shard_compact.nx

nx_shard_compact.nx

buildroot/runtime/_hdl_build/nx_shard_compact.nx

2943 B50 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind tooltopic shard
docsdependenciesstructsconstsfunctions

about

nx_shard_compact.nx -- fold a domain's PUBLIC shard to ONE segment via the store's own cap-aware compaction (ss_compact_cap: data-driven writer, fail-before-swap crash-safe). This is ALSO the positions-sidecar UPGRADE for pre-phrase shards: the merged segment is rebuilt through ss_write_seg, which now emits seg-<id>.pos -- quoted phrases go EXACT after one compaction. usage: nx_shard_compact <domain> license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_docportal_search_seg.nx nx_shard_compact.nx

imports: nx_docportal_search_seg.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sc_puts dss_prefix ss_manifest_cap ss_manifest_file_cap sys_mmap ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sc_num ss_compact_cap sys_mmap ↻ ss_manifest_cap ↻ ss_cat ↻ ss_readall ↻ ss_r32 ss_kcmp ss_add2 ss_w32 ss_write_seg ss_segid_ok sys_mmap ↻ ss_cat ↻ ss_catn sys_mmap ↻ sys_write ss_segname ss_cat ↻ ss_catn ↻ ss_writefile sys_openat_wr sys_write ↻ sys_close ↻ sys_fsync sys_renameat ss_build_keys

structs

none

consts

8const K_MAGIC_4096: i64 = 4096

functions

10func sc_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
11func sc_num(v: i64) -> i64
called by 1: main
21func main(argc: i64, argv: *i64) -> i64