You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "frankvicky (via GitHub)" <gi...@apache.org> on 2025/01/24 07:20:32 UTC

[PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

frankvicky opened a new pull request, #18687:
URL: https://github.com/apache/kafka/pull/18687

   JIRA: KAFKA-18630
   There are some fields that have become placeholders since we are removing zk.
   We should do some cleanup for this class, and see what fields could be removed.
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov merged PR #18687:
URL: https://github.com/apache/kafka/pull/18687


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on code in PR #18687:
URL: https://github.com/apache/kafka/pull/18687#discussion_r1928822257


##########
core/src/main/java/kafka/server/builders/ReplicaManagerBuilder.java:
##########
@@ -164,23 +117,23 @@ public ReplicaManager build() {
                              time,
                              scheduler,
                              logManager,
-                             OptionConverters.toScala(remoteLogManager),
+                             Option.empty(),
                              quotaManagers,
                              metadataCache,
                              logDirFailureChannel,
                              alterPartitionManager,
                              brokerTopicStats,
-                             isShuttingDown,
-                             OptionConverters.toScala(delayedProducePurgatory),
-                             OptionConverters.toScala(delayedFetchPurgatory),
-                             OptionConverters.toScala(delayedDeleteRecordsPurgatory),
-                             OptionConverters.toScala(delayedRemoteFetchPurgatory),
-                             OptionConverters.toScala(delayedRemoteListOffsetsPurgatory),
-                             OptionConverters.toScala(delayedShareFetchPurgatory),
-                             OptionConverters.toScala(threadNamePrefix),
-                             () -> brokerEpoch,
-                             OptionConverters.toScala(addPartitionsToTxnManager),
-                             directoryEventHandler,
+                             new AtomicBoolean(false),
+                             Option.empty(),

Review Comment:
   Hi @clolov 
   Thanks for the review.
   Unfortunately, a few tests still use the constructor to send their test purgatory instance, and these instances rely on MockTimer to conduct the test. (Especially for `ReplicaManagerTest`)
   So I think we shouldn't not remove the constructor parameters at this moment.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on code in PR #18687:
URL: https://github.com/apache/kafka/pull/18687#discussion_r1928822257


##########
core/src/main/java/kafka/server/builders/ReplicaManagerBuilder.java:
##########
@@ -164,23 +117,23 @@ public ReplicaManager build() {
                              time,
                              scheduler,
                              logManager,
-                             OptionConverters.toScala(remoteLogManager),
+                             Option.empty(),
                              quotaManagers,
                              metadataCache,
                              logDirFailureChannel,
                              alterPartitionManager,
                              brokerTopicStats,
-                             isShuttingDown,
-                             OptionConverters.toScala(delayedProducePurgatory),
-                             OptionConverters.toScala(delayedFetchPurgatory),
-                             OptionConverters.toScala(delayedDeleteRecordsPurgatory),
-                             OptionConverters.toScala(delayedRemoteFetchPurgatory),
-                             OptionConverters.toScala(delayedRemoteListOffsetsPurgatory),
-                             OptionConverters.toScala(delayedShareFetchPurgatory),
-                             OptionConverters.toScala(threadNamePrefix),
-                             () -> brokerEpoch,
-                             OptionConverters.toScala(addPartitionsToTxnManager),
-                             directoryEventHandler,
+                             new AtomicBoolean(false),
+                             Option.empty(),

Review Comment:
   Hi @clolov 
   Thanks for the review.
   Unfortunately, a few tests still use the constructor to send their test purgatory instance, and these instances rely on MockTimer to conduct the test. 
   So I think we shouldn't not remove the constructor parameters at this moment.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

Posted by "clolov (via GitHub)" <gi...@apache.org>.
clolov commented on code in PR #18687:
URL: https://github.com/apache/kafka/pull/18687#discussion_r1929013604


##########
core/src/main/java/kafka/server/builders/ReplicaManagerBuilder.java:
##########
@@ -164,23 +117,23 @@ public ReplicaManager build() {
                              time,
                              scheduler,
                              logManager,
-                             OptionConverters.toScala(remoteLogManager),
+                             Option.empty(),
                              quotaManagers,
                              metadataCache,
                              logDirFailureChannel,
                              alterPartitionManager,
                              brokerTopicStats,
-                             isShuttingDown,
-                             OptionConverters.toScala(delayedProducePurgatory),
-                             OptionConverters.toScala(delayedFetchPurgatory),
-                             OptionConverters.toScala(delayedDeleteRecordsPurgatory),
-                             OptionConverters.toScala(delayedRemoteFetchPurgatory),
-                             OptionConverters.toScala(delayedRemoteListOffsetsPurgatory),
-                             OptionConverters.toScala(delayedShareFetchPurgatory),
-                             OptionConverters.toScala(threadNamePrefix),
-                             () -> brokerEpoch,
-                             OptionConverters.toScala(addPartitionsToTxnManager),
-                             directoryEventHandler,
+                             new AtomicBoolean(false),
+                             Option.empty(),

Review Comment:
   I see! Thanks for pointing this out!



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-18630: Clean ReplicaManagerBuilder [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #18687:
URL: https://github.com/apache/kafka/pull/18687#issuecomment-2613753218

   >  I will merge in trunk and 4.0 - thanks once again!
   
   Friendly reminder: Since Kafka version 4.0 has passed the code freeze, backporting all cleanup efforts to this version is no longer required. @ijuma  has provided valuable insights regarding backporting in https://github.com/apache/kafka/pull/18625#issuecomment-2601198752


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org