Skip to content

KAFKA-15778 & KAFKA-15779: Implement metrics manager (KIP-714) - #14699

Merged
junrao merged 22 commits into
apache:trunkfrom
apoorvmittal10:kip-714-ak-manager
Nov 29, 2023
Merged

KAFKA-15778 & KAFKA-15779: Implement metrics manager (KIP-714)#14699
junrao merged 22 commits into
apache:trunkfrom
apoorvmittal10:kip-714-ak-manager

Conversation

@apoorvmittal10

Copy link
Copy Markdown
Contributor

The PR provide implementation for client metrics manager along with other classes. Manager is responsible to support 3 operations:

  1. UpdateSubscription - From kafka-configs.sh and reload from metadata cache.
  2. Process Get Telemetry Request - From KafkaApis.scala
  3. Process Push Telemetry Request - From KafkaApis.scala

Manager maintains an in-memory cache to keep track of client instances against their instance id.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Comment thread core/src/main/java/kafka/metrics/ClientMetricsConfigs.java
return INSTANCE;
}
// Max cache size (16k active client connections per broker)
private static final int CM_CACHE_MAX_SIZE = 16384;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache should hold the information of all connected client hence it should support the number of clients that can connect to single broker. Kept it high enough for now but would require suggestions for best approach. @AndrewJSchofield mentioned that it might be the max.connections broker config but the configs uppoer bound is Int.MAX_VALUE hence we need to think about better upper bound here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this enough? A broker could handle 100s of Ks of connections.

@apoorvmittal10 apoorvmittal10 Nov 10, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then should it be in low 100K i.e. 2^17 = 131072? I am not sure what the right config should be here, I know the cloud providers like MSK typically provides 3000 active connections per broker where this limit is higher in case of Confluent but what typically are the active number of client connecting to broker should be.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The challenge is that the connections can vary depending on the type of broker host. Larger instance typically can accommodate more connections. Do we need to make this an LRU cache? If a client is terminated or idle, we should remove them from the cache. Otherwise, we probably should just rely on the existing max.connections to control the client connections?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to make this an LRU cache? If a client is terminated or idle, we should remove them from the cache

I have started with LRU cache and planning to improve this with cache which timebounds the connection. The KIP says: client instance specific state is maintained in broker memory up to MAX(60*1000, PushIntervalMs * 3) milliseconds. I ll add improvement on the cache to respect that: https://issues.apache.org/jira/browse/KAFKA-15813

}
// Max cache size (16k active client connections per broker)
private static final int CM_CACHE_MAX_SIZE = 16384;
private final Cache<Uuid, ClientMetricsInstance> clientInstanceCache;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The KIP-714 says: This client instance specific state is maintained in broker memory up to MAX(60*1000, PushIntervalMs * 3) milliseconds and is used to enforce the push interval rate-limiting. There is no persistence of client instance metrics state across broker restarts or between brokers.

I have started with LRUCache with oldest entry eviction but will implement something similar to Selector.IdleExpiryManager which cleansup old connections.

Comment thread core/src/main/java/kafka/metrics/ClientMetricsConfigs.java
@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

@junrao @hachikuji @AndrewJSchofield @mjsax Please if I can get feedback on the PR.

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apoorvmittal10 : Thanks for the PR. Made a pass of non-testing files. Left a few comments.

Comment thread clients/src/main/java/org/apache/kafka/common/requests/PushTelemetryRequest.java Outdated
*/
package kafka.server;

import java.util.Collections;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this class be in the same package as other client metric related classes like DefaultClientTelemetryPayload?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I kept this at kafka.server package as I see all managers (in scala) processing API calls from KafkaApis.scala resides kafka.server package.

@Override
public void close() throws IOException {
// TODO: Implement the close logic to close the client metrics manager.
// Do nothing for now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clear up the internal data?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have cleaned up the subscription map, there is no method currently exposed to clear cache but I ll add that as improvement while improving the cache code.

Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/metrics/ClientMetricsReceiverPlugin.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
// broker's point of view. But the broker does not have this information rather the port could be
// the broker's port where the client connection is established. We might want to consider removing
// the client source port from the KIP or use broker port if that can be helpful.
// TODO: fix port

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We populate RequestContext in SocketServer. We could obtain the client port through transportLayer.socketChannel().socket().getPort in KafkaChannel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @junrao this is helpful. I will make the changes in subsequent PR to address this. I have created following jira for same: https://issues.apache.org/jira/browse/KAFKA-15811

}

private static ByteBuffer decompressMetricsData(CompressionType compressionType, byte[] metrics) {
// TODO: Add support for decompression of metrics data

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this will be added in a future PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have created jira in parent KIP-714 task to address this: https://issues.apache.org/jira/browse/KAFKA-15807. I am planning to get end-to-end metrics flow without compression first.

Comment thread core/src/main/java/kafka/metrics/ClientMetricsConfigs.java Outdated
@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

@apoorvmittal10 : Thanks for the PR. Made a pass of non-testing files. Left a few comments.

Thanks a lot for the review @junrao . I have addressed the comments and have a question related to throttleTimeMs for errors in the comments. Please if you can re-review.

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apoorvmittal10 : Thanks for the updated PR. Made a pass of all files. A few more comments.

Comment thread core/src/main/java/kafka/metrics/ClientMetricsReceiverPlugin.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
public PushTelemetryResponse createResponse(int throttleTimeMs, Errors errors) {
PushTelemetryResponseData responseData = new PushTelemetryResponseData();
responseData.setErrorCode(errors.code());
responseData.setThrottleTimeMs(throttleTimeMs);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following is my understanding. There are two types of throttling.

  1. Generic request throttling based on % of CPU a client uses on the broker. This applies to any request, including PushTelemetry. In this case, the error code is none and the throttleTimeMs field is set. The client will mute the channel for throttleTimeMs before sending future requests.
  2. PushTelemetry specific throttling because PushTelemetry is sent too frequently. In this case, we should set THROTTLING_QUOTA_EXCEEDED as the error code and avoid setting the throttleTimeMs field since we don't want to the client to mute the channel for all requests.

Comment thread core/src/main/java/kafka/metrics/ClientMetricsConfigs.java Outdated
Comment thread core/src/test/java/kafka/server/ClientMetricsManagerTest.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
}

public boolean terminating() {
return terminating;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the instance is terminated, when do we remove the instance form the in-memory state?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why I didn't remove the instance from in-memory cache as the subsequent requests from terminated client should be rejected. Having said that, the terminated client should also not remain in-memory forever hence the terminated client should be removed from cache as per the eviction policy of cache i.e. MAX(60*1000, PushIntervalMs * 3) milliseconds. This shall be inherently handled by the cache improvement task where we have some time based eviction policy.

Comment thread core/src/test/java/kafka/metrics/ClientMetricsInstanceTest.java Outdated
@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing @junrao, I have updated the PR.

@mjsax mjsax added core Kafka Broker kip Requires or implements a KIP labels Nov 16, 2023
@Test
public void testMaybeUpdateRequestEpochValid() {
// First request should be accepted.
assertTrue(clientInstance.maybeUpdateGetRequestEpoch(System.currentTimeMillis()));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use MockTime instead of System time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the class/methods I am testing do not have Time reference rather just tries to updates the epoch supplied hence I didn't see any value in using MockTime. However I did change the code and tests for ClientMetricsManager where these methods are invoked from, I started using Time in ClientMetricsManager and corresponding MockTime in ClientMetricsManagerTest which eliminated the use of Thread.sleep.

Please let me know if I am missing anything here.

Comment thread clients/src/main/java/org/apache/kafka/common/requests/PushTelemetryRequest.java Outdated
Comment thread core/src/main/java/kafka/metrics/ClientMetricsReceiverPlugin.java Outdated
@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

Thanks @junrao for leaving the comments, I have tried to address them.

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apoorvmittal10 : Thanks for the updated PR. Left a few more comments.

Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/metrics/ClientMetricsInstance.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/test/java/kafka/server/ClientMetricsManagerTest.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/server/ClientMetricsManager.java Outdated
Comment thread core/src/main/java/kafka/metrics/ClientMetricsReceiverPlugin.java Outdated
Comment thread clients/src/main/java/org/apache/kafka/common/protocol/Errors.java Outdated
@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

@junrao @AndrewJSchofield Thanks for the LGTM and approving the PR. Below is the test run status, none of the failing tests are related to the changes in the PR but I have tried to debug further. Among 20, 17 have already been reported as flaky test in jira, for remaining 3 I tried to locally reproduce but couldn't hence created flaky test for same. Can we merge the PR?

New failing - 20

Already existing jira for flaky test: Build / JDK 11 and Scala 2.13 / testResetSinkConnectorOffsetsZombieSinkTasks – org.apache.kafka.connect.integration.OffsetsApiIntegrationTest
1m 2s: https://issues.apache.org/jira/browse/KAFKA-15524

Already existing jira for flaky test: Build / JDK 11 and Scala 2.13 / testRackAwareRangeAssignor(String).quorum=kraft – integration.kafka.server.FetchFromFollowerIntegrationTest
8s: https://issues.apache.org/jira/browse/KAFKA-15020

Already existing jira for flaky test: Build / JDK 11 and Scala 2.13 / testRackAwareRangeAssignor(String).quorum=kraft – integration.kafka.server.FetchFromFollowerIntegrationTest
6s: https://issues.apache.org/jira/browse/KAFKA-15020

Already existing jira for flaky test: Build / JDK 11 and Scala 2.13 / testTaskRequestWithOldStartMsGetsUpdated() – org.apache.kafka.trogdor.coordinator.CoordinatorTest
2m 0s: https://issues.apache.org/jira/browse/KAFKA-15760

Already existing jira for flaky test: Build / JDK 21 and Scala 2.13 / testReplicateSourceDefault() – org.apache.kafka.connect.mirror.integration.IdentityReplicationIntegrationTest
2m 0s: https://issues.apache.org/jira/browse/KAFKA-15292

Already existing jira for flaky test: Build / JDK 21 and Scala 2.13 / testConsumptionWithBrokerFailures() – kafka.api.ConsumerBounceTest
31s: https://issues.apache.org/jira/browse/KAFKA-15146

Already existing jira for flaky test: Build / JDK 21 and Scala 2.13 / testDescribeClusterRequestIncludingClusterAuthorizedOperations(String).quorum=kraft – kafka.server.DescribeClusterRequestTest
4s: https://issues.apache.org/jira/browse/KAFKA-15759

Already existing jira for flaky test: Build / JDK 21 and Scala 2.13 / testSendOffsetsWithGroupId(String).quorum=zk – org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest
1m 15s: https://issues.apache.org/jira/browse/KAFKA-15772

Created Jira, cannot reproduce locally (also exists other flaky tests from same class, have already ben reported by others): Build / JDK 21 and Scala 2.13 / shouldQuerySpecificStalePartitionStores() – org.apache.kafka.streams.integration.StoreQueryIntegrationTest
4s: Another test in same class flaky: https://issues.apache.org/jira/browse/KAFKA-9897, created jira: https://issues.apache.org/jira/browse/KAFKA-15896

Already existing jira for flaky test: Build / JDK 17 and Scala 2.13 / testReplicateSourceDefault() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest
2m 23s: https://issues.apache.org/jira/browse/KAFKA-15699

Already existing jira for flaky test: Build / JDK 17 and Scala 2.13 / testMultiWorkerRestartOnlyConnector – org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest
2m 33s: https://issues.apache.org/jira/browse/KAFKA-15675

Already existing jira for flaky test: Build / JDK 17 and Scala 2.13 / testDescribeTokenForOtherUserPasses(String).quorum=kraft – kafka.api.DelegationTokenEndToEndAuthorizationWithOwnerTest
9s: https://issues.apache.org/jira/browse/KAFKA-15411

Created flaky test jira, cannot reproduce locally: Build / JDK 17 and Scala 2.13 / testWrongIncarnationId() – kafka.server.ControllerRegistrationManagerTest
30s: https://issues.apache.org/jira/browse/KAFKA-15897

Created flaky test jira, cannot reproduce locally: Build / JDK 17 and Scala 2.13 / testFenceMultipleBrokers() – org.apache.kafka.controller.QuorumControllerTest
43s: https://issues.apache.org/jira/browse/KAFKA-15898

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / testSyncTopicConfigs() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest
2m 33s: https://issues.apache.org/jira/browse/KAFKA-14971

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / [2] quorum=kraft, isIdempotenceEnabled=false – kafka.api.DelegationTokenEndToEndAuthorizationWithOwnerTest
10s: https://issues.apache.org/jira/browse/KAFKA-15411

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / testDescribeClusterRequestExcludingClusterAuthorizedOperations(String).quorum=kraft – kafka.server.DescribeClusterRequestTest
4s: https://issues.apache.org/jira/browse/KAFKA-15419

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / shouldWriteLatestOffsetsToCheckpointOnShutdown[at_least_once, processing threads = true] – org.apache.kafka.streams.integration.EosIntegrationTest
1m 25s: https://issues.apache.org/jira/browse/KAFKA-15690

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / shouldWriteLatestOffsetsToCheckpointOnShutdown[exactly_once, processing threads = true] – org.apache.kafka.streams.integration.EosIntegrationTest
1m 21s: https://issues.apache.org/jira/browse/KAFKA-15690

Already existing jira for flaky test: Build / JDK 8 and Scala 2.12 / shouldWriteLatestOffsetsToCheckpointOnShutdown[exactly_once_v2, processing threads = true] – org.apache.kafka.streams.integration.EosIntegrationTest: https://issues.apache.org/jira/browse/KAFKA-15690

@junrao

junrao commented Nov 27, 2023

Copy link
Copy Markdown
Contributor

@apoorvmittal10 : Thanks for triaging the tests. In the mailing list, it seems that we are still leaning towards requiring green builds before merging a PR.

@junrao junrao closed this Nov 28, 2023
@junrao junrao reopened this Nov 28, 2023
@junrao

junrao commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Just merged #14632. Triggering another test run to make sure there are no new issues.

@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

Just merged #14632. Triggering another test run to make sure there are no new issues.

Thanks @junrao.

@junrao

junrao commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

@apoorvmittal10 : It seems that the build for JDK 17 and Scala 2.13 didn't complete.

@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

@apoorvmittal10 : It seems that the build for JDK 17 and Scala 2.13 didn't complete.

Thanks @junrao. Strange to see the failure in. :clients:test. I can see below unrelated failure in logs, retriggered build.

> Task :clients:test
org.apache.kafka.common.network.SelectorTest.testConnectionsByClientMetric() failed, log available in /home/jenkins/jenkins-agent/712657a4/workspace/Kafka_kafka-pr_PR-14699/clients/build/reports/testOutput/org.apache.kafka.common.network.SelectorTest.testConnectionsByClientMetric().test.stdout

Gradle Test Run :clients:test > Gradle Test Executor 13 > SelectorTest > testConnectionsByClientMetric() FAILED
    java.util.concurrent.TimeoutException: testConnectionsByClientMetric() timed out after 240 seconds
        at org.junit.jupiter.engine.extension.TimeoutExceptionFactory.create(TimeoutExceptionFactory.java:29)
        at org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:58)
        at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
        at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
        at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
        at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:218)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:214)

@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

Hi @junrao, I have triaged the test cases as per the latest run.

Existing: Build / JDK 17 and Scala 2.13 / testMultiWorkerRestartOnlyConnector – org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest
2m 21s: https://issues.apache.org/jira/browse/KAFKA-15675

Existing: Build / JDK 17 and Scala 2.13 / testRackAwareRangeAssignor(String).quorum=zk – integration.kafka.server.FetchFromFollowerIntegrationTest
39s: https://issues.apache.org/jira/browse/KAFKA-15020

Existing: Build / JDK 17 and Scala 2.13 / testCoordinatorFailover(String, String).quorum=zk.groupProtocol=generic – kafka.api.SslConsumerTest
8s: https://issues.apache.org/jira/browse/KAFKA-15920

Existing: Build / JDK 17 and Scala 2.13 / testDescribeClusterRequestExcludingClusterAuthorizedOperations(String).quorum=kraft – kafka.server.DescribeClusterRequestTest
3s: https://issues.apache.org/jira/browse/KAFKA-15419

Existing: Build / JDK 17 and Scala 2.13 / testFenceMultipleBrokers() – org.apache.kafka.controller.QuorumControllerTest
51s: https://issues.apache.org/jira/browse/KAFKA-15898

Existing: Build / JDK 21 and Scala 2.13 / testSyncTopicConfigs() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest
1m 42s: https://issues.apache.org/jira/browse/KAFKA-15523

Existing: Build / JDK 21 and Scala 2.13 / testTaskRequestWithOldStartMsGetsUpdated() – org.apache.kafka.trogdor.coordinator.CoordinatorTest
2m 0s: https://issues.apache.org/jira/browse/KAFKA-15760

Existing: Build / JDK 11 and Scala 2.13 / testSyncTopicConfigs() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest
3m 44s: https://issues.apache.org/jira/browse/KAFKA-15523

Triaged: Build / JDK 11 and Scala 2.13 / testRestartReplication() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest
3m 21s: https://issues.apache.org/jira/browse/KAFKA-15933

Triaged: Build / JDK 11 and Scala 2.13 / testMultiConsumerStickyAssignor(String, String).quorum=kraft+kip848.groupProtocol=generic – kafka.api.PlaintextConsumerTest
2m 12s: https://issues.apache.org/jira/browse/KAFKA-15934

Existing: Build / JDK 8 and Scala 2.12 / testSyncTopicConfigs() – org.apache.kafka.connect.mirror.integration.IdentityReplicationIntegrationTest
4m 25s: https://issues.apache.org/jira/browse/KAFKA-14971

Triaged: Build / JDK 8 and Scala 2.12 / testRestartReplication() – org.apache.kafka.connect.mirror.integration.IdentityReplicationIntegrationTest
2m 8s: https://issues.apache.org/jira/browse/KAFKA-15935

Existing: Build / JDK 8 and Scala 2.12 / testNoCheckpointsIfNoRecordsAreMirrored() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest
2m 59s: https://issues.apache.org/jira/browse/KAFKA-15699

Existing: Build / JDK 8 and Scala 2.12 / testSyncTopicConfigs() – org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest
3m 37s: https://issues.apache.org/jira/browse/KAFKA-15523

Existing: Build / JDK 8 and Scala 2.12 / testMultiWorkerRestartOnlyConnector – org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest
2m 28s: https://issues.apache.org/jira/browse/KAFKA-15761

Existing: Build / JDK 8 and Scala 2.12 / testMultiWorkerRestartOnlyConnector – org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest
2m 39s: https://issues.apache.org/jira/browse/KAFKA-15761

Triaged: Build / JDK 8 and Scala 2.12 / testGetActiveTopics – org.apache.kafka.connect.integration.ConnectorTopicsIntegrationTest
1m 50s: https://issues.apache.org/jira/browse/KAFKA-15936

Triaged: Build / JDK 8 and Scala 2.12 / testTopicTrackingResetIsDisabled – org.apache.kafka.connect.integration.ConnectorTopicsIntegrationTest
2m 37s: https://issues.apache.org/jira/browse/KAFKA-15936

Triaged: Build / JDK 8 and Scala 2.12 / testTopicTrackingIsDisabled – org.apache.kafka.connect.integration.ConnectorTopicsIntegrationTest
3m 4s: https://issues.apache.org/jira/browse/KAFKA-15936

Existing: Build / JDK 8 and Scala 2.12 / testConnectorReconfiguration – org.apache.kafka.connect.integration.ExactlyOnceSourceIntegrationTest
1m 42s: https://issues.apache.org/jira/browse/KAFKA-14901

Existing: Build / JDK 8 and Scala 2.12 / testSeparateOffsetsTopic – org.apache.kafka.connect.integration.ExactlyOnceSourceIntegrationTest
3m 35s: https://issues.apache.org/jira/browse/KAFKA-14089

Triaged: Build / JDK 8 and Scala 2.12 / testTopicDeletion(String).quorum=kraft – kafka.admin.RemoteTopicCrudTest
1m 30s: https://issues.apache.org/jira/browse/KAFKA-15937

Triaged: Build / JDK 8 and Scala 2.12 / testCreateRemoteTopicWithValidRetentionTime(String).quorum=kraft – kafka.admin.RemoteTopicCrudTest
2m 17s: https://issues.apache.org/jira/browse/KAFKA-15938

Triaged: Build / JDK 8 and Scala 2.12 / testInvalidAlterConfigs(String).quorum=kraft – kafka.api.AdminClientWithPoliciesIntegrationTest
2m 2s: https://issues.apache.org/jira/browse/KAFKA-15939

Existing: Build / JDK 8 and Scala 2.12 / testDescribeClusterRequestExcludingClusterAuthorizedOperations(String).quorum=kraft – kafka.server.DescribeClusterRequestTest
3s: https://issues.apache.org/jira/browse/KAFKA-15419

Triaged: Build / JDK 8 and Scala 2.12 / testLogCleanerConfig(String).quorum=kraft – kafka.server.DynamicBrokerReconfigurationTest
41s: https://issues.apache.org/jira/browse/KAFKA-15940

Existing: Build / JDK 8 and Scala 2.12 / shouldHaveSamePositionBoundActiveAndStandBy – org.apache.kafka.streams.integration.ConsistencyVectorIntegrationTest
22s: https://issues.apache.org/jira/browse/KAFKA-15770

Existing: Build / JDK 8 and Scala 2.12 / shouldWriteLatestOffsetsToCheckpointOnShutdown[exactly_once_v2, processing threads = true] – org.apache.kafka.streams.integration.EosIntegrationTest
2m 11s: https://issues.apache.org/jira/browse/KAFKA-15690

Existing: Build / JDK 8 and Scala 2.12 / shouldUpgradeFromEosAlphaToEosV2[false] – org.apache.kafka.streams.integration.EosV2UpgradeIntegrationTest
1m 47s: https://issues.apache.org/jira/browse/KAFKA-15095

Existing: Build / JDK 8 and Scala 2.12 / shouldUpgradeFromEosAlphaToEosV2[true] – org.apache.kafka.streams.integration.EosV2UpgradeIntegrationTest
4m 31s: https://issues.apache.org/jira/browse/KAFKA-15095

Triaged: Build / JDK 8 and Scala 2.12 / shouldRestoreNullRecord() – org.apache.kafka.streams.integration.RestoreIntegrationTest
1m 5s: https://issues.apache.org/jira/browse/KAFKA-15941

Existing: Build / JDK 8 and Scala 2.12 / testTopicDeletion(String).quorum=kraft – org.apache.kafka.tools.TopicCommandIntegrationTest
4m 11s: https://issues.apache.org/jira/browse/KAFKA-15140

Existing: Build / JDK 8 and Scala 2.12 / testDescribeReportOverriddenConfigs(String).quorum=kraft – org.apache.kafka.tools.TopicCommandIntegrationTest: https://issues.apache.org/jira/browse/KAFKA-15140

@apoorvmittal10

Copy link
Copy Markdown
Contributor Author

@junrao The tests failures are not related to the changes.

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the analysis, @apoorvmittal10. The PR LGTM.

@junrao
junrao merged commit f1819f4 into apache:trunk Nov 29, 2023
@apoorvmittal10
apoorvmittal10 deleted the kip-714-ak-manager branch January 5, 2024 12:47
yyu1993 pushed a commit to yyu1993/kafka that referenced this pull request Feb 15, 2024
…e#14699)

The PR provide implementation for client metrics manager along with other classes. Manager is responsible to support 3 operations:

UpdateSubscription - From kafka-configs.sh and reload from metadata cache.
Process Get Telemetry Request - From KafkaApis.scala
Process Push Telemetry Request - From KafkaApis.scala
Manager maintains an in-memory cache to keep track of client instances against their instance id.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
AnatolyPopov pushed a commit to aiven/kafka that referenced this pull request Feb 16, 2024
…e#14699)

The PR provide implementation for client metrics manager along with other classes. Manager is responsible to support 3 operations:

UpdateSubscription - From kafka-configs.sh and reload from metadata cache.
Process Get Telemetry Request - From KafkaApis.scala
Process Push Telemetry Request - From KafkaApis.scala
Manager maintains an in-memory cache to keep track of client instances against their instance id.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
clolov pushed a commit to clolov/kafka that referenced this pull request Apr 5, 2024
…e#14699)

The PR provide implementation for client metrics manager along with other classes. Manager is responsible to support 3 operations:

UpdateSubscription - From kafka-configs.sh and reload from metadata cache.
Process Get Telemetry Request - From KafkaApis.scala
Process Push Telemetry Request - From KafkaApis.scala
Manager maintains an in-memory cache to keep track of client instances against their instance id.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>
return request.getErrorResponse(0, exception);
} finally {
// Update the client instance with the latest push request parameters.
clientInstance.terminating(request.data().terminating());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We noticed an edge case and have opened #23094 to discuss it. It would be great to get your review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Kafka Broker kip Requires or implements a KIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants