Skip to content

perf(wal): use optimized SHA-256 for opaque payload validation - #417

Merged
beinan merged 1 commit into
lance-format:mainfrom
beinan:codex/wal-payload-sha256-final
Oct 20, 2026
Merged

beinan merged 1 commit into
lance-format:mainfrom
beinan:codex/wal-payload-sha256-final

Conversation

@beinan

@beinan beinan commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Opaque WAL records currently compute and validate payload digests with the sha2 backend, which is expensive on CPUs without dedicated SHA instructions. Use ring's optimized SHA-256 implementation while preserving the algorithm, stored digest bytes, record format, validation order and corruption checks. This does not claim an end-to-end ingestion throughput improvement.

Keep sha2 as a test-only reference for record builds and verify old/new digest compatibility at SHA block boundaries, large payload sizes and unaligned input offsets. Other features that require sha2 retain their existing dependency.

Refs #378.

Testing

The complete repository CI helper passed: 605 workspace Rust tests, Python 229 passed / 2 skipped / 1 expected failure, formatting, Clippy, Ruff and Pyright. All-feature WAL Clippy, server build and workspace packaging also passed. All 101 focused WAL tests passed; the record-only development configuration also passed its six tests. Source hashes matched before and after qualification.

The three changed files are byte-identical to the qualified implementation. Inherited main changes are audited separately; final-head GitHub CI validates the rebased integration.

@beinan
beinan merged commit 622b9f5 into lance-format:main Oct 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant