Skip to content

feat(diskless): add managed replicas testing infrastructure and partition reassignment#505

Draft
jeqo wants to merge 3 commits intojeqo/pod-2121-transformer-replicasfrom
jeqo/pod-2122-add-partitions-support
Draft

feat(diskless): add managed replicas testing infrastructure and partition reassignment#505
jeqo wants to merge 3 commits intojeqo/pod-2121-transformer-replicasfrom
jeqo/pod-2122-add-partitions-support

Conversation

@jeqo
Copy link
Contributor

@jeqo jeqo commented Feb 9, 2026

Completing Diskless managed-replicas feature:

  • Add immediate partition reassignment support for diskless topics (auto-apply new replicas without manual reassignment)
  • Add integration tests for managed replicas feature using 2-broker cluster with rack assignments
  • Add docker compose demo for manual testing of managed replicas with complete documentation

Details

Controller: Immediate Partition Reassignment

  • When adding partitions to diskless topics with managed replicas, newly assigned replicas are applied immediately without requiring manual partition reassignment

Integration Tests

  • ManagedReplicasCluster test class with 2-broker, 2-rack setup
  • Tests verify: RF=2 with rack-aware placement, ISR correctness, produce/consume
  • AZ-aware routing test via diskless_az= client ID prefix
  • Negative test: non-diskless topics unaffected by managed replicas

Docker Demo

  • docker-compose.managed-replicas.yml overlay with 2 brokers (az1, az2)
  • make managed-replicas target for easy startup
  • Complete test procedure in README: topic creation, RF verification, AZ-aware routing, metrics

Test plan

  • Integration tests pass: ./gradlew :core:test --tests "kafka.server.InklessClusterTest$ManagedReplicasCluster"
  • Docker demo verified: RF=2, produce/consume, metrics endpoint
  • Manual testing with make managed-replicas KAFKA_VERSION=local

@jeqo jeqo force-pushed the jeqo/pod-2121-transformer-replicas branch from 2d516d0 to 8763a1f Compare February 9, 2026 19:37
jeqo added 3 commits February 9, 2026 21:37
For diskless topics, partition reassignment now completes immediately
without the staged process (addingReplicas/removingReplicas). Since
data is stored in object storage rather than local disk, there is
nothing to sync between replicas.

Changes:
- Skip setting targetRemoving/targetAdding for diskless topics
- Use target replicas directly instead of merged replica list
- Update tests to expect immediate completion (no ongoing reassignment)
Add ManagedReplicasCluster test class to InklessClusterTest with:
- 2-broker cluster with rack assignments (az1, az2)
- createDisklessTopicWithManagedReplicas: verifies RF=2, rack-aware
  placement (one replica per rack), ISR correctness, produce/consume
- produceAndConsumeWithClientAZ: tests AZ-aware routing via client ID
- nonDisklessTopicDoesNotGetManagedReplicas: verifies non-diskless
  topics are not affected by managed replicas
Add docker compose overlay for testing diskless managed replicas:
- docker-compose.managed-replicas.yml: 2-broker cluster with rack
  assignments (az1, az2) enabling diskless.managed.rf.enable
- README.md: complete test procedure for verifying RF=2,
produce/consume,
  AZ-aware routing via client ID, and prometheus metrics
- Makefile: add managed-replicas target
@jeqo jeqo force-pushed the jeqo/pod-2122-add-partitions-support branch from d9437fd to 2481558 Compare February 9, 2026 19:38
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