Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -595,13 +595,13 @@ jobs:
fi
grep -Fq "v0.9 refusal and export/import rebuild completed" "$test_log" \
|| { echo "::error::v0.9 upgrade regression did not complete"; exit 1; }
grep -Eq "test current_v7_refuses_and_rebuilds_genuine_v09_graph_end_to_end \\.\\.\\. ok" "$test_log" \
grep -Eq "test current_v8_refuses_and_rebuilds_genuine_v09_graph_end_to_end \\.\\.\\. ok" "$test_log" \
|| { echo "::error::exact v0.9 refusal and rebuild regression did not pass"; exit 1; }
if grep -Fq "skipping immediate-predecessor v6 upgrade test" "$test_log"; then
echo "::error::v6 format fence skipped despite a configured 0.10 release binary"
exit 1
fi
grep -Eq "test current_v7_refuses_and_rebuilds_genuine_v6_and_v6_refuses_v7 \\.\\.\\. ok" "$test_log" \
grep -Eq "test current_v8_refuses_and_rebuilds_genuine_v6_and_v6_refuses_v8 \\.\\.\\. ok" "$test_log" \
|| { echo "::error::exact v6 format fence did not pass"; exit 1; }


Expand Down Expand Up @@ -685,8 +685,8 @@ jobs:
cargo test --locked -p omnigraph-engine --test forbidden_apis --features failpoints -- --test-threads=1 2>&1 | tee "$test_log"
python3 scripts/check-storage-upgrade-ci.py --check-log protocol "$test_log"

v5_v7_format_fence:
name: V5 ↔ V7 Format Fence
v5_v8_format_fence:
name: V5 ↔ V8 Format Fence
needs: classify_changes
# Pull requests too, as a reporting context like `Test Workspace`: a
# fence red reports on the pull request instead of first appearing on `main`.
Expand Down Expand Up @@ -719,7 +719,7 @@ jobs:
with:
workspaces: |
. -> target
key: crossversion-v5-v7
key: crossversion-v5-v8
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-on-failure: true

Expand Down Expand Up @@ -755,21 +755,21 @@ jobs:
--target-dir "$GITHUB_WORKSPACE/target"
echo "OMNIGRAPH_V5_BIN=$v5_bin" >> "$GITHUB_ENV"

- name: Run exact v5↔v7 refusal and rebuild fence
- name: Run exact v5↔v8 refusal and rebuild fence
run: |
set -euo pipefail
test_log="$RUNNER_TEMP/v5-v7-format-fence.log"
test_log="$RUNNER_TEMP/v5-v8-format-fence.log"
cargo test --locked -p omnigraph-cli --test crossversion_upgrade \
current_v7_refuses_and_rebuilds_genuine_v5_and_v5_refuses_v7 \
current_v8_refuses_and_rebuilds_genuine_v5_and_v5_refuses_v8 \
-- --exact --nocapture 2>&1 | tee "$test_log"
if grep -Fq "skipping immediate-predecessor v5 upgrade test" "$test_log"; then
echo "::error::v5↔v7 format fence skipped despite a configured predecessor binary"
echo "::error::v5↔v8 format fence skipped despite a configured predecessor binary"
exit 1
fi
grep -Eq "test current_v7_refuses_and_rebuilds_genuine_v5_and_v5_refuses_v7 \.\.\. ok" "$test_log" \
|| { echo "::error::exact v5↔v7 format fence did not execute normally"; exit 1; }
grep -Eq "test current_v8_refuses_and_rebuilds_genuine_v5_and_v5_refuses_v8 \.\.\. ok" "$test_log" \
|| { echo "::error::exact v5↔v8 format fence did not execute normally"; exit 1; }
grep -Eq "test result: ok\. 1 passed; 0 failed" "$test_log" \
|| { echo "::error::v5↔v7 format fence matched the wrong test set"; exit 1; }
|| { echo "::error::v5↔v8 format fence matched the wrong test set"; exit 1; }

test_aws_feature:
name: Test omnigraph-server --features aws
Expand Down
31 changes: 16 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 18 additions & 7 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ cargo bench --locked -p omnigraph-engine --bench scenarios -- \
```

Use `branch-create`, `branch-create-from`, `branch-list`, or `branch-delete`.
`--branches` counts existing siblings, excluding `main` and the delete target;

The same setup/operation/verify owner also provides:

- `branch-pointer-adopt-lazy`: fast-forward a changed source into a lazy named target.
- `branch-pointer-adopt-owned`: fast-forward a descendant source into a named target that already owns a table fork.
- `branch-first-write`: append one row to a target that inherits its source's table fork.
- `branch-cleanup`: collect retired forks while preserving a native table parent required by a live child.

These four scenarios verify complete rows, exact published table pins and physical table refs outside the timed operation. Pointer scenarios require zero instrumented table writes and verify a later isolated target write in the separate verification child. Cleanup creates collectible work even with `--retired-branches 0`; its effective collectible count is recorded separately. The age/cache/layout controls remain available, and the full-row fixtures are bounded to 16,384 rows, 16 dimensions and eight branches/tables. A larger cold fixture with a one-row delta can use `--rows 4096 --dims 4`; warm/compacted controls retain their smaller limits. Setup and the verification child's isolation write are never included in operation latency.
`--branches` counts existing siblings, excluding `main` and scenario-specific targets or cleanup parent/child branches;
`--tables` counts populated tables. One table contains `--rows` vectors of
`--dims` dimensions, and each remaining table contains one scalar row.
Create-from uses a named source with data distinct from main. The delete
Expand All @@ -28,8 +37,8 @@ Each repetition prepares a fresh fixture, measures one public operation, and
verifies the resulting branch registry and pinned table views in separate
processes. Operation time excludes graph open. Operation-process peak RSS
includes runtime initialization and graph open, but excludes setup and final
verification. Delete reports acknowledgement and completed reclamation
separately. Compare identical parameters, builds, and machines; these JSONL
verification. Delete leaves table forks for explicit cleanup and reports no
reclaim wait. Compare identical parameters, builds, and machines; these JSONL
records are diagnostic evidence and do not enter the durable archive.

`fenced-adopt-all-new` measures an insertion-only merge into an unchanged
Expand All @@ -47,8 +56,9 @@ to a single-path throughput sample.
forking, then restores its original embedding. The accepted row count and
content stay fixed while graph commits, table versions, and deletion history
accumulate. N defaults to zero and must be even, at most 256.
`--retired-branches N` creates, writes, deletes, and awaits reclamation of N
temporary branches before the measured workload, at most 32. This is a
`--retired-branches N` creates, writes and deletes N temporary graph branches
before the measured workload, at most 32. Their table forks remain until
explicit cleanup. This is a
separate churn dimension; retired branches do not add reachable main history.
Both options apply to branch controls and `general-merge-updates` only.
The setup records and checks actual history growth and content restoration.
Expand Down Expand Up @@ -114,8 +124,9 @@ memory pool, and three-second pauses between points. These are recorded
runtime settings, not a hard CPU or process-memory cap. Each point has a
180-second whole-process watchdog. All child phases and fixture parameters
must verify before a sample is accepted. Counters cover foreground operation
I/O; deferred reclaim I/O is outside their task-local scope. Open time and
delete completion time remain separate from acknowledgement latency.
I/O through instrumented handles, including the exported table-write count;
they do not represent all storage requests or deletes. Explicit cleanup is
a separate scenario. Open time remains separate from operation latency.
Explicit age runs of create/create-from additionally time the first accepted
snapshot, pinned opens, and one payload row per inherited table after the fork.
Those reads have separate counters and do not enter acknowledgement or
Expand Down
9 changes: 1 addition & 8 deletions crates/omnigraph-cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,6 @@ impl GraphClient {
let db = Self::open_embedded(uri).await?;
let actor = actor.as_deref();
db.branch_delete_as(name, actor).await?;
// The process exits right after this call; join the
// background fork reclaim so it is not dropped mid-flight.
db.wait_for_fork_reclaims().await;
Ok(BranchDeleteOutput {
uri: uri.clone(),
name: name.to_string(),
Expand Down Expand Up @@ -1212,11 +1209,7 @@ impl GraphClient {
// composition sites against drift).
let (branch_deleted, branch_delete_error) = if delete_branch {
match db.branch_delete_as(source, actor).await {
Ok(()) => {
// Same process-exit reasoning as branch_delete's join.
db.wait_for_fork_reclaims().await;
(Some(true), None)
}
Ok(()) => (Some(true), None),
Err(err) => (Some(false), Some(err.to_string())),
}
} else {
Expand Down
7 changes: 5 additions & 2 deletions crates/omnigraph-cli/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ fn print_human(report: &omnigraph::db::UpgradeReport) -> Result<()> {
.validation_bytes
.map_or_else(|| "unknown".into(), |v| v.to_string())
);
for check in &report.work.deferred_checks {
println!("validation deferred until the preceding conversion completes: {check}");
}
for exclusion in &report.work.external_blob_exclusions {
println!("external bytes excluded from preservation: {exclusion}");
}
Expand Down Expand Up @@ -152,12 +155,12 @@ mod tests {
"graph.omni",
"--check",
"--to-format",
"7",
"8",
"--json",
])
.unwrap();
assert!(
matches!(&cli.command, Command::Upgrade { uri: Some(uri), check: true, to_format: Some(7), json: true } if uri == "graph.omni")
matches!(&cli.command, Command::Upgrade { uri: Some(uri), check: true, to_format: Some(8), json: true } if uri == "graph.omni")
);
assert_eq!(
planes::command_capability(&cli.command),
Expand Down
Loading