← Back to Pull requests

fix(inkless:consolidation): freeze cross-tier start during prune #806

Closed
unknown closed this pull request without merging on Sep 24, 2026 12:18 UTC
View on GitHub
unknown unknown commented on Sep 18, 2026 14:32 UTC
Author

When consolidation starts after pure-diskless retention, no stored cross-tier start exists. Inferring one from broker-local or remote metadata can publish an unreadable offset or over-delete a switched prefix.

The first consolidated prune now freezes the current WAL start as remote_log_start_offset in the same control-plane transaction, then advances log_start_offset. Until that handoff completes, RemoteLogManager keeps copying while deferring its become-leader report and remote expiration. Switched partitions can submit seal - 1 so the handoff can run even when that request removes no WAL records.

This prevention-only change does not repair rows that already contain an incorrect remote_log_start_offset.

Test plan


  • JAVA_HOME=$(/usr/libexec/java_home -v 25) ./gradlew :storage:inkless:generateJooqClasses --rerun-tasks --no-daemon --no-parallel

  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./gradlew :storage:test --tests org.apache.kafka.server.log.remote.storage.RemoteLogManagerTest --no-daemon --no-parallel

  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./gradlew :storage:inkless:test --tests 'PruneCrossTierBootstrap' :core:test --tests io.aiven.inkless.consolidation.ConsolidatedDisklessLogPrunerTest --no-daemon --no-parallel

  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./gradlew :storage:inkless:test --tests io.aiven.inkless.control_plane.InMemoryControlPlanePruneDisklessLogsTest --tests io.aiven.inkless.control_plane.postgres.PruneBatchesBelowHighestTieredOffsetV1Test --no-daemon --no-parallel

  • JAVA_HOME=$(/usr/libexec/java_home -v 17) ./gradlew :storage:checkstyleMain :storage:checkstyleTest :storage:inkless:checkstyleMain :storage:inkless:checkstyleTest --no-daemon --no-parallel

  • bash tests/docker/ducker-ak test tests/kafkatest/tests/inkless/consolidation_cross_tier_earliest_test.py
  • Diff: 230 lines (+172 / -58) across 2 files Reviewer: giuseppelillo Review duration: 8506m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 230 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #806"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37% (MEDIUM) · Higher = larger blast radius
    37%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%
    Repository