[jira] [Commented] (KAFKA-12506) Expand AdjustStreamThreadCountTest

2024-03-17 Thread Arpit Goyal (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-12506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827837#comment-17827837
 ] 

Arpit Goyal commented on KAFKA-12506:
-

[~ableegoldman] Is this ticket still open to work upon ? I want to pick it up  
and start learning KStreams.

> Expand AdjustStreamThreadCountTest
> --
>
> Key: KAFKA-12506
> URL: https://issues.apache.org/jira/browse/KAFKA-12506
> Project: Kafka
>  Issue Type: Sub-task
>  Components: streams, unit tests
>Reporter: A. Sophie Blee-Goldman
>Assignee: Aviral Srivastava
>Priority: Major
>  Labels: newbie, newbie++
>
> Right now the AdjustStreamThreadCountTest runs a minimal topology that just 
> consumes a single input topic, and doesn't produce any data to this topic. 
> Some of the complex concurrency bugs that we've found only showed up when we 
> had some actual data to process and a stateful topology: 
> [KAFKA-12503|https://issues.apache.org/jira/browse/KAFKA-12503] KAFKA-12500
> See the umbrella ticket for the list of improvements we need to make this a 
> more effective integration test



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] KAFKA-16000: Migrate MembershipManagerImplTest away from ConsumerTestBuilder [kafka]

2024-03-17 Thread via GitHub


github-actions[bot] commented on PR #14950:
URL: https://github.com/apache/kafka/pull/14950#issuecomment-2002866951

   This PR is being marked as stale since it has not had any activity in 90 
days. If you would like to keep this PR alive, please ask a committer for 
review. If the PR has  merge conflicts, please update it with the latest from 
trunk (or appropriate release branch)  If this PR is no longer valid or 
desired, please feel free to close it. If no activity occurs in the next 30 
days, it will be automatically closed.


-- 
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-unsubscr...@kafka.apache.org

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



[PR] MINOR : Removed the depreciated information about Zk to Kraft migration. [kafka]

2024-03-17 Thread via GitHub


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

   The current document about Zookeeper to kraft migration is depreciated.
   Accord to [KIP-833: Mark KRaft as Production 
Ready](https://cwiki.apache.org/confluence/display/KAFKA/KIP-833%3A+Mark+KRaft+as+Production+Ready),
 the migration from ZK mode supported as GA.
   
   ### 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-unsubscr...@kafka.apache.org

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



[jira] [Commented] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Chia-Ping Tsai (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827825#comment-17827825
 ] 

Chia-Ping Tsai commented on KAFKA-16376:


[~brandboat] you are right. will close this as duplicate

 

[~yangpoan] Sorry for creating duplicate :(

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Assignee: PoAn Yang
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Chia-Ping Tsai (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai resolved KAFKA-16376.

Resolution: Duplicate

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Assignee: PoAn Yang
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Kuan Po Tseng (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827824#comment-17827824
 ] 

Kuan Po Tseng commented on KAFKA-16376:
---

Correct me if I'm wrong, but this appears to be a duplicate of KAFKA-16323.

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Assignee: PoAn Yang
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Assigned] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread PoAn Yang (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

PoAn Yang reassigned KAFKA-16376:
-

Assignee: PoAn Yang

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Assignee: PoAn Yang
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Chia-Ping Tsai (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827821#comment-17827821
 ] 

Chia-Ping Tsai commented on KAFKA-16376:


[~yangpoan] go ahead :)

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread PoAn Yang (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827820#comment-17827820
 ] 

PoAn Yang commented on KAFKA-16376:
---

Hi [~chia7712], may I take this issue? I would like to try this. Thanks!

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Chris Holland (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827819#comment-17827819
 ] 

Chris Holland commented on KAFKA-16376:
---

Hey, I un-assigned myself for now as I am unfamiliar with scala programming. 
Fixing a Java test would be better for me :) 

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] MINOR: unlock before closing queue [kafka]

2024-03-17 Thread via GitHub


TaiJuWu commented on code in PR #15551:
URL: https://github.com/apache/kafka/pull/15551#discussion_r1527638304


##
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java:
##
@@ -260,6 +260,7 @@ private void handleEvents() throws InterruptedException {
 if (deadlineMap.isEmpty() && (shuttingDown || 
interrupted)) {
 // If there are no more entries to process, and 
the queue is
 // closing, exit the thread.
+lock.unlock();

Review Comment:
   You are right. Close this.



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] MINOR: unlock before closing queue [kafka]

2024-03-17 Thread via GitHub


TaiJuWu closed pull request #15551: MINOR: unlock before closing queue
URL: https://github.com/apache/kafka/pull/15551


-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] MINOR: unlock before closing queue [kafka]

2024-03-17 Thread via GitHub


chia7712 commented on code in PR #15551:
URL: https://github.com/apache/kafka/pull/15551#discussion_r1527631191


##
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java:
##
@@ -260,6 +260,7 @@ private void handleEvents() throws InterruptedException {
 if (deadlineMap.isEmpty() && (shuttingDown || 
interrupted)) {
 // If there are no more entries to process, and 
the queue is
 // closing, exit the thread.
+lock.unlock();

Review Comment:
   it seems the lock can get freed by the `finally` block, right?
   
   
https://github.com/apache/kafka/blob/trunk/server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java#L293



-- 
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-unsubscr...@kafka.apache.org

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



[PR] MINOR: unlock before closing queue [kafka]

2024-03-17 Thread via GitHub


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

   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### 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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


chia7712 commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1527554674


##
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##
@@ -78,6 +111,10 @@ public Measurable measurable() {
 }
 }
 
+/**
+ * Set the metric config.

Review Comment:
   This method normally is used to update quota and it should be used by 
server-side only. Could you add comments to remind `MetricsReporter` users that 
they should NOT call this method? ditto for `config()` method



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


johnnychhsu commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1527554056


##
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##
@@ -40,15 +48,30 @@ public KafkaMetric(Object lock, MetricName metricName, 
MetricValueProvider va
 this.time = time;
 }
 
+/**
+ * Get the configuration of this metric
+ * @return Return the config of this metric
+ */
 public MetricConfig config() {
-return this.config;
+synchronized (lock) {

Review Comment:
   this is addressed in [#15550](https://github.com/apache/kafka/pull/15550)



-- 
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-unsubscr...@kafka.apache.org

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



[PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-17 Thread via GitHub


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

   ## Context
   In KafkaMetirc.java, the config getter is 
   
   ```
   @Override
   public MetricName metricName()
   { return this.metricName; }
   ```
   
   and there is a setter 
   
   ```
   public void config(MetricConfig config) {
       synchronized (lock) {    
this.config = config;  
}
   }
   ```
   
   Since it's possible to set and get in the mean time, we should have lock in 
the getter as well
   
   Refer to [KAFKA-16381](https://issues.apache.org/jira/browse/KAFKA-16381).
   
   ## Solution
   Add the lock in the config getter
   
   ## Test
   ```
   ./gradlew cleanTest core:test --tests ConnectionQuotasTest --tests 
ControllerMutationQuotaTest stream:test --tests StandbyTaskTest --tests 
StreamTaskTest
   ```
   and it passed
   
   ### 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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


johnnychhsu commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1527553634


##
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##
@@ -40,15 +48,30 @@ public KafkaMetric(Object lock, MetricName metricName, 
MetricValueProvider va
 this.time = time;
 }
 
+/**
+ * Get the configuration of this metric
+ * @return Return the config of this metric
+ */
 public MetricConfig config() {
-return this.config;
+synchronized (lock) {

Review Comment:
   sure, let me address this. I think you are right, this is a different issue. 
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-unsubscr...@kafka.apache.org

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



[jira] [Created] (KAFKA-16381) We should use a lock to protect the config getter in KafkaMetric

2024-03-17 Thread Johnny Hsu (Jira)
Johnny Hsu created KAFKA-16381:
--

 Summary: We should use a lock to protect the config getter in 
KafkaMetric
 Key: KAFKA-16381
 URL: https://issues.apache.org/jira/browse/KAFKA-16381
 Project: Kafka
  Issue Type: Bug
Reporter: Johnny Hsu
Assignee: Johnny Hsu


In KafkaMetirc.java, the getter is 

```
@Override
public MetricName metricName() {
return this.metricName;
}
```

and there is a setter 

```
public void config(MetricConfig config) {
    synchronized (lock) {
    this.config = config;
  }
}
```

Since it's possible to set and get in the mean time, we should have lock in the 
getter as well



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


chia7712 commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1527537826


##
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##
@@ -40,15 +48,30 @@ public KafkaMetric(Object lock, MetricName metricName, 
MetricValueProvider va
 this.time = time;
 }
 
+/**
+ * Get the configuration of this metric
+ * @return Return the config of this metric
+ */
 public MetricConfig config() {
-return this.config;
+synchronized (lock) {

Review Comment:
   Could you please file another jira to trace it? This fix is good but it 
should be in another PR.



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


johnnychhsu commented on PR #15483:
URL: https://github.com/apache/kafka/pull/15483#issuecomment-2002480150

   tested with 
   ```
   ./gradlew cleanTest core:test --tests ConnectionQuotasTest --tests 
ControllerMutationQuotaTest stream:test --tests StandbyTaskTest --tests 
StreamTaskTest
   ```
   and it passed


-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16318 : add javafoc for kafka metric [kafka]

2024-03-17 Thread via GitHub


johnnychhsu commented on code in PR #15483:
URL: https://github.com/apache/kafka/pull/15483#discussion_r1527503839


##
clients/src/main/java/org/apache/kafka/common/metrics/KafkaMetric.java:
##
@@ -40,15 +48,28 @@ public KafkaMetric(Object lock, MetricName metricName, 
MetricValueProvider va
 this.time = time;
 }
 
+/**
+ * Get the configuration of this metric
+ * @return Return the config of this metric
+ */
 public MetricConfig config() {
 return this.config;

Review Comment:
   I think you are right, there is a lock for setter, we should have a lock for 
getter as well. 
   Thanks for the suggestion, let me add that



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16341: fix the LogValidator for non-compressed type [kafka]

2024-03-17 Thread via GitHub


johnnychhsu commented on PR #15476:
URL: https://github.com/apache/kafka/pull/15476#issuecomment-2002453829

   @chia7712 thanks for the reminder.
   
   Below are the failed tests from the build 
   > [Build / JDK 17 and Scala 2.13 / 
kafka.api.CustomQuotaCallbackTest.testCustomQuotaCallback()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.api/CustomQuotaCallbackTest/Build___JDK_17_and_Scala_2_13___testCustomQuotaCallback__/)
   > [Build / JDK 17 and Scala 2.13 / 
kafka.api.DelegationTokenEndToEndAuthorizationWithOwnerTest."testNoDescribeProduceOrConsumeWithoutTopicDescribeAcl(String,
 boolean).quorum=kraft, 
isIdempotenceEnabled=false"](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.api/DelegationTokenEndToEndAuthorizationWithOwnerTest/Build___JDK_17_and_Scala_2_13testNoDescribeProduceOrConsumeWithoutTopicDescribeAcl_String__boolean__quorum_kraft__isIdempotenceEnabled_false_/)
   > [Build / JDK 17 and Scala 2.13 / 
kafka.server.LogDirFailureTest.testIOExceptionDuringCheckpoint(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.server/LogDirFailureTest/Build___JDK_17_and_Scala_2_13___testIOExceptionDuringCheckpoint_String__quorum_kraft/)
   > [Build / JDK 17 and Scala 2.13 / 
kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.server/ReplicaManagerTest/Build___JDK_17_and_Scala_2_13___testRemoteFetchExpiresPerSecMetric__/)
   > [Build / JDK 11 and Scala 2.13 / 
org.apache.kafka.common.network.SslTransportLayerTest."testUngracefulRemoteCloseDuringHandshakeRead(Args).tlsProtocol=TLSv1.2,
 
useInlinePem=true"](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/org.apache.kafka.common.network/SslTransportLayerTest/Build___JDK_11_and_Scala_2_13testUngracefulRemoteCloseDuringHandshakeRead_Args__tlsProtocol_TLSv1_2__useInlinePem_true_/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.api.ConsumerBounceTest.testConsumptionWithBrokerFailures()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.api/ConsumerBounceTest/Build___JDK_11_and_Scala_2_13___testConsumptionWithBrokerFailures__/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.api.PlaintextConsumerTest.testExpandingTopicSubscriptions(String, 
String).quorum=kraft+kip848.groupProtocol=consumer](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.api/PlaintextConsumerTest/Build___JDK_11_and_Scala_2_13___testExpandingTopicSubscriptions_String__String__quorum_kraft_kip848_groupProtocol_consumer/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.network.DynamicConnectionQuotaTest.testDynamicListenerConnectionCreationRateQuota(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.network/DynamicConnectionQuotaTest/Build___JDK_11_and_Scala_2_13___testDynamicListenerConnectionCreationRateQuota_String__quorum_kraft/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.server.ControllerRegistrationManagerTest.testWrongIncarnationId()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.server/ControllerRegistrationManagerTest/Build___JDK_11_and_Scala_2_13___testWrongIncarnationId__/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.server.LogDirFailureTest.testIOExceptionDuringLogRoll(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.server/LogDirFailureTest/Build___JDK_11_and_Scala_2_13___testIOExceptionDuringLogRoll_String__quorum_kraft/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.server/ReplicaManagerTest/Build___JDK_11_and_Scala_2_13___testRemoteFetchExpiresPerSecMetric__/)
   > [Build / JDK 11 and Scala 2.13 / 
kafka.zk.ZkMigrationIntegrationTest.testNewAndChangedTopicsInDualWrite [1] 
Type=ZK, MetadataVersion=3.4-IV0, 
Security=PLAINTEXT](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/kafka.zk/ZkMigrationIntegrationTest/Build___JDK_11_and_Scala_2_13___testNewAndChangedTopicsInDualWrite__1__Type_ZK__MetadataVersion_3_4_IV0__Security_PLAINTEXT/)
   > [Build / JDK 11 and Scala 2.13 / 
org.apache.kafka.tools.MetadataQuorumCommandTest.testDescribeQuorumReplicationSuccessful
 [5] Type=Raft-Combined, MetadataVersion=3.8-IV0, 
Security=PLAINTEXT](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-15476/10/testReport/junit/org.apache.kafka.tools/MetadataQuorumCommandTest/Build___JDK_11_and_Scala_2_13___testDescribeQuorumReplicationSuccessful__5__Type_Raft_Combined__MetadataVersion_3_8_IV0__Security_PLAINTEXT/)
   > [Build / JDK 11 and Scala 2.13 / 

[jira] [Commented] (KAFKA-16263) Add Kafka Streams docs about available listeners/callback

2024-03-17 Thread Kuan Po Tseng (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-16263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827779#comment-17827779
 ] 

Kuan Po Tseng commented on KAFKA-16263:
---

May I take over this issue ? I'm quite interested in Kafka Streams :)

> Add Kafka Streams docs about available listeners/callback
> -
>
> Key: KAFKA-16263
> URL: https://issues.apache.org/jira/browse/KAFKA-16263
> Project: Kafka
>  Issue Type: Task
>  Components: docs, streams
>Reporter: Matthias J. Sax
>Priority: Minor
>  Labels: beginner, newbie
>
> Kafka Streams allows to register all kind of listeners and callback (eg, 
> uncaught-exception-handler, restore-listeners, etc) but those are not in the 
> documentation.
> A good place might be 
> [https://kafka.apache.org/documentation/streams/developer-guide/running-app.html]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [PR] KAFKA-15302: Stale value returned when using store.all() with key deletion [docs] [kafka]

2024-03-17 Thread via GitHub


jinyongchoi commented on code in PR #15495:
URL: https://github.com/apache/kafka/pull/15495#discussion_r1527474042


##
docs/streams/developer-guide/memory-mgmt.html:
##
@@ -151,6 +151,10 @@
 Serdes.Long())
   .withCachingEnabled();
   Record caches are not supported for versioned state stores.
+  Caution: When using withCachingEnabled(),
+if you delete() a key from the Store while iterating(e.g., 
KeyValueIterator) through the keys,
+the value of the key that hasn't been flushed from the cache may be 
returned as a stale value.
+Therefore, when deleting, you must flush() the cache before the 
iterator.

Review Comment:
   Could you verify the changes I fixed?
   
   ![memory-mgmt 
html](https://github.com/apache/kafka/assets/17429867/9d3aa1e4-258d-4e25-b438-0c4a6ccd9144)
   



-- 
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-unsubscr...@kafka.apache.org

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



Re: [PR] KAFKA-16341: fix the LogValidator for non-compressed type [kafka]

2024-03-17 Thread via GitHub


chia7712 commented on PR #15476:
URL: https://github.com/apache/kafka/pull/15476#issuecomment-2002394407

   @johnnychhsu Could you check the failed tests? 


-- 
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-unsubscr...@kafka.apache.org

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



[PR] KAFKA-16232: kafka hangs forever in the starting process if the authorizer future is not returned [kafka]

2024-03-17 Thread via GitHub


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

   This is part of 
[KAFKA-16232](https://issues.apache.org/jira/browse/KAFKA-16232)
   > 2. add logs before and after future waiting, to allow admin to know we're 
waiting for the authorizer future.
   
   ### 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-unsubscr...@kafka.apache.org

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



[jira] [Commented] (KAFKA-15538) Client support for java regex based subscription

2024-03-17 Thread Phuc Hong Tran (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-15538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17827769#comment-17827769
 ] 

Phuc Hong Tran commented on KAFKA-15538:


nvm I figured out what you meant

> Client support for java regex based subscription
> 
>
> Key: KAFKA-15538
> URL: https://issues.apache.org/jira/browse/KAFKA-15538
> Project: Kafka
>  Issue Type: Sub-task
>  Components: clients, consumer
>Reporter: Lianet Magrans
>Assignee: Phuc Hong Tran
>Priority: Blocker
>  Labels: kip-848-client-support, newbie, regex
> Fix For: 3.8.0
>
>
> When using subscribe with a java regex (Pattern), we need to resolve it on 
> the client side to send the broker a list of topic names to subscribe to.
> Context:
> The new consumer group protocol uses [Google 
> RE2/J|https://github.com/google/re2j] for regular expressions and introduces 
> new methods in the consumer API to subscribe using a `SubscribePattern`. The 
> subscribe using a java `Pattern` will be still supported for a while but 
> eventually removed.
>  * When the subscribe with SubscriptionPattern is used, the client should 
> just send the regex to the broker and it will be resolved on the server side.
>  * In the case of the subscribe with Pattern, the regex should be resolved on 
> the client side.
> As part of this task, we should re-enable all integration tests defined in 
> the PlainTextAsyncConsumer that relate to subscription with pattern and that 
> are currently disabled for the new consumer + new protocol



--
This message was sent by Atlassian Jira
(v8.20.10#820010)