← Back to Pull requests

fix(inkless:consolidation): start consolidation when remote storage is enabled later [KC-540] #802

Closed
unknown closed this pull request without merging on Sep 17, 2026 14:27 UTC
View on GitHub
unknown unknown commented on Sep 16, 2026 12:54 UTC
Author

Summary


Enabling remote.storage.enable on an already-diskless topic is a config-only write today, so brokers never re-enter become-leader and consolidation never arms. When cluster consolidation is on, the controller co-commits a leader-epoch bump with that ConfigRecord. Brokers re-enter become-leader, create the local log if needed, and start the consolidation fetcher. The bump is skipped when consolidation is off, the topic is not already diskless, or the same request starts a classic-to-diskless switch.
A WAL-gap fetch after that arm can land below the diskless WAL start while RLMM is still catching up. The endpoint proves a remote prefix from RLMM (or a cheap local positive): present-true returns OFFSET_MOVED_TO_TIERED_STORAGE, present-false leaves never-tiered OFFSET_OUT_OF_RANGE, and empty returns NOT_LEADER_OR_FOLLOWER so the fetcher retries at debug. ConsolidationRemotePrefixUnknown is 1 during that wait and 0 once decided. Register resets the latch; fetcher removal clears it without tearing down the lag gauges. Alert on a sustained non-zero after __remote_log_metadata catch-up; a leadership transition or an overlapping fetch can dip or briefly restore the value.

Test plan


  • Controller: late remote.storage.enable=true on an already-diskless topic emits epoch-bump PartitionChangeRecord objects in the same batch as the ConfigRecord.

  • Controller: no bump when consolidation is off, the topic is classic, or the same request starts a switch.

  • Broker: become-leader after the bump arms the consolidation fetcher for a born-diskless topic.

  • WAL-gap fetch: RLMM present-true → OFFSET_MOVED; present-false → OFFSET_OUT_OF_RANGE; empty → NOT_LEADER_OR_FOLLOWER.

  • Metrics: registerPartition resets ConsolidationRemotePrefixUnknown; fetcher removal clears the latch and leaves lag gauges registered.
  • Diff: 236 lines (+177 / -59) across 2 files Reviewer: giuseppelillo Review duration: 1533m
    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 · 236 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.327
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #802"
    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.2% (MEDIUM) · Higher = larger blast radius
    37.2%
    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.7% · Safe to merge
    14.7%
    Repository