Skip to content

KAFKA-20164: Add handleLoadBootstrap to KRaft#21453

Open
mannoopj wants to merge 5 commits intoapache:trunkfrom
mannoopj:KAFKA-20164
Open

KAFKA-20164: Add handleLoadBootstrap to KRaft#21453
mannoopj wants to merge 5 commits intoapache:trunkfrom
mannoopj:KAFKA-20164

Conversation

@mannoopj
Copy link
Contributor

@mannoopj mannoopj commented Feb 11, 2026

KAFKA-20164: Adds a new handleLoadBootstrap callback to RaftClient.Listener so that bootstrap snapshots are handled separately from committed snapshots. I've made it so that the QuorumController is the only implementation of RaftClient.Listener that handles uncommitted bootstrap snapshot file.

RaftClient.java — Added handleLoadBootstrap as a method in RaftClient.Listener, updated javadocs for handleLoadSnapshot and handleLeaderChange
KafkaRaftClient.java — Routes snapshot loading to handleLoadBootstrap or handleLoadSnapshot based on whether the snapshot ID equals BOOTSTRAP_SNAPSHOT_ID
QuorumController.java — Added handleLoadBootstrap implementation with full replay logic for bootstrap snapshots
MetadataLoader.java — Added handleLoadBootstrap function
MockRaftClientListener.java — Added handleLoadBootstrap function
ReplicatedCounter.java — Added handleLoadBootstrap function
RaftClientTestContext.java — Added handleLoadBootstrap function
TestRaftServer.scala — Added handleLoadBootstrap function

@github-actions github-actions bot added triage PRs from the community kraft labels Feb 11, 2026
… layer

- Add handleLoadBootstrap as abstract method in RaftClient.Listener
- Add isCommittedSnapshot() to SnapshotReader interface and RecordsSnapshotReader
- Route to handleLoadBootstrap or handleLoadSnapshot in KafkaRaftClient
- Add handleLoadBootstrap implementation to QuorumController
- Add handleLoadBootstrap implementation to MetadataLoader
- Make bootstrapMetadata volatile in QuorumController
- Add isCommittedSnapshot support to MetadataLoaderTest MockSnapshotReader
- Add handleLoadBootstrap to test classes (ReplicatedCounter, MockRaftClientListener, MockListener)
@mannoopj mannoopj changed the title KAFKA-20164: Add handleLoadBootstrap and isCommittedSnapshot to KRaft… KAFKA-20164: Add handleLoadBootstrap to KRaft… Feb 11, 2026
@mannoopj mannoopj changed the title KAFKA-20164: Add handleLoadBootstrap to KRaft… KAFKA-20164: Add handleLoadBootstrap to KRaft Feb 11, 2026
@github-actions github-actions bot added the small Small PRs label Feb 11, 2026
@github-actions github-actions bot added the core Kafka Broker label Feb 11, 2026
@mannoopj mannoopj marked this pull request as ready for review February 11, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker kraft small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant