Skip to content

Conversation

@jeqo
Copy link
Contributor

@jeqo jeqo commented Jan 22, 2026

Implements Phase 1 of Diskless Managed Replicas (see #478 docs/inkless/ts-unification/DISKLESS_MANAGED_RF.md).

When diskless.managed.rf.enable=true, new diskless topics are created with RF = rack_count (one replica per rack) using standard KRaft replica placement, instead of legacy RF=1.

Changes

  • Add diskless.managed.rf.enable server config (default: false)
  • Compute RF from rack cardinality at topic creation
  • Use standard replicaPlacer.place() for rack-aware assignment
  • Allow manual replica assignments for operational flexibility
  • Comprehensive unit tests for managed and unmanaged modes

Known Limitations (Phase 1)

  • Add Partitions: Inherits RF from existing partitions (Phase 3)
  • Transformer: Not updated - still uses legacy routing (Phase 2)
  • Integration tests: Deferred to Phase 2
  • Observability metrics: Deferred to Phase 2

Testing

  • Tests for: no-racks, with-racks, invalid input, internal topics, broker fencing, unregister scenarios

Configuration

Config Default Description
diskless.managed.rf.enable false When true, new diskless topics get RF=rack_count

jeqo added 3 commits January 22, 2026 14:35
… unregister scenarios

- Add _noRacks and _withRacks test variants for consistent coverage
- Fix tests that assumed broker 0 was always the leader
- Get actual leader from partition registration before fencing/unregistering
- Use dynamic assertions based on actual partition state
- Improve assertion error messages for clarity
Add diskless.managed.rf.enable config (default: false) to control whether
diskless topics use managed replicas with RF=rack_count or legacy RF=1.

This config only affects topic creation. When enabled, new diskless topics
will be created with one replica per rack using standard KRaft placement.

Part of Phase 1: Diskless Managed Replicas
(See #478 docs/inkless/ts-unification/DISKLESS_MANAGED_RF.md)
When diskless.managed.rf.enable=true, new diskless topics are created with
RF=rack_count using standard KRaft replica placement instead of legacy RF=1.

Changes:
- Compute RF from rack cardinality via rackCardinality()
- Use standard replicaPlacer.place() for rack-aware assignment
- Allow manual replica assignments when managed replicas enabled
- Add checkstyle suppression for extended createTopic method

Phase 1 limitations:
- Add Partitions inherits RF from existing partitions (Phase 3)
- Transformer not updated, uses legacy routing (Phase 2)
- Integration tests deferred to Phase 2
(See #478 docs/inkless/ts-unification/DISKLESS_MANAGED_RF.md)
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.

2 participants