Skip to content
This repository was archived by the owner on Sep 29, 2026. It is now read-only.

Close three kernel gates the benchmark notes flagged. - #119

Merged
jepsontaylor merged 1 commit into
mainfrom
fix/kernel-p0-gates
Sep 25, 2026
Merged

jepsontaylor merged 1 commit into
mainfrom
fix/kernel-p0-gates

Conversation

@jepsontaylor

Copy link
Copy Markdown
Collaborator

Summary

Ideas taken from the kernel benchmark battletest that were still true in the tree, as tests and fixes. No speed ratio is claimed. Durability stays Strict. wal_pipeline stays off.

  • Clock eviction walks enough times to decay a frame whose usage has saturated at 5. A clean unpinned page is no longer reported as unevictable after two visits.
  • A row lock that is free but already has a waiter is not granted to a newcomer. A spurious wake grants the lock only to the waiter at the front.
  • A morsel arena offset that does not fit in u32 aborts instead of truncating the stored offset in release builds.
  • An exact 128-byte WAL segment fill stays at 128 bytes. The rotation path already refused to write past the limit; the test keeps that.

Not in this pull request: one-pass scan loads, positional I/O, physical WAL batching, route-versus-index admission, and any suite median. Those are later measurements on the official Normal lane.

Claim: AGENT_CHAT.md 2026-09-25T18:40Z fix/kernel-p0-gates.

Acceptance: cargo test -p redlinedb-kernel --offline --lib newcomer_does_not_cut fifo_handoff; cargo test -p redlinedb-kernel --offline --test storage_tests buffer_pool_evicts_a_clean_frame; cargo test -p redlinedb-kernel --offline --test wal_tests exact_segment_fill; cargo test -p redlinedb-sql --offline --lib an_offset_past_u32. Local just pr-ci exited 0 (/tmp/redline-pr-ci-p0.log).

Parent: 76ba2a52c469c8917929418ff1f4fe8f5b6623cf.

A clean page whose clock usage has saturated can be evicted. A new row-lock caller does not take a free row ahead of a waiter already queued, and a spurious wake does not grant the lock to anyone but the front. A morsel arena offset that does not fit in u32 aborts instead of truncating. An exact WAL segment fill stays within the configured length.

Claim: AGENT_CHAT.md 2026-09-25T18:40Z fix/kernel-p0-gates.
Acceptance: cargo test -p redlinedb-kernel --offline --lib newcomer_does_not_cut fifo_handoff; cargo test -p redlinedb-kernel --offline --test storage_tests buffer_pool_evicts_a_clean_frame; cargo test -p redlinedb-kernel --offline --test wal_tests exact_segment_fill; cargo test -p redlinedb-sql --offline --lib an_offset_past_u32

@neverhumanbot neverhumanbot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clock eviction, row-lock FIFO, and morsel arena bounds. Exact WAL segment fill stays inside the limit. Required, audit, official parity, evidence guard, and packaging succeeded on 85bbec3.

@jepsontaylor
jepsontaylor merged commit 1e21f23 into main Sep 25, 2026
31 checks passed
@jepsontaylor
jepsontaylor deleted the fix/kernel-p0-gates branch September 25, 2026 18:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants