analarissac opened a new pull request, #24004:
URL: https://github.com/apache/kafka/pull/24004
# Refactor: fix Long Parameter List, Divergent Change and outdated Comments
Three small refactorings, one commit per smell. No behavior change intended.
- **Long Parameter List (`LogManager`)**: grouped six time-based maintenance
settings into a `LogMaintenanceConfig` record. Constructor went from 20 to 15
parameters. Callers (Java/Scala), tests and benchmarks updated.
- **Divergent Change (`DistributedHerder`)**: extracted session key
rotation/validation into a dedicated class, so the herder focuses on
coordination.
- **Comments (`TaskManager`)**: removed an outdated comment that referenced
`activeTasks`, which no longer exists (the code uses `TasksRegistry tasks`).
## Testing
**Long Parameter List**
```bash
# Compile Java/Scala tests and benchmarks
./gradlew :storage:compileTestJava :core:compileTestScala
:jmh-benchmarks:compileJava --console=plain
# Run related tests
./gradlew :storage:test \
--tests "org.apache.kafka.storage.internals.log.LogManagerTest" \
--tests "org.apache.kafka.storage.internals.log.LogLoaderTest" \
--console=plain
```
**Divergent Change**
```bash
# Checkstyle
./gradlew :connect:runtime:checkstyleMain
# Tests
./gradlew :connect:runtime:test --tests "*DistributedHerderTest"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]