Skip to content

KAFKA-9441: Cleanup Streams metrics for removed task commit latency metrics#8356

Merged
mjsax merged 2 commits intoapache:trunkfrom
mjsax:kafka-9441-kip-447-metrics-cleanup
Apr 1, 2020
Merged

KAFKA-9441: Cleanup Streams metrics for removed task commit latency metrics#8356
mjsax merged 2 commits intoapache:trunkfrom
mjsax:kafka-9441-kip-447-metrics-cleanup

Conversation

@mjsax
Copy link
Copy Markdown
Member

@mjsax mjsax commented Mar 25, 2020

Follow up to #8218 (KIP-447) that remove usage of task commit latency sensor. However, the underlying metrics were still registered, even if unused. This PR does the follow up cleanup to remove the metrics entirely.

The thread level commit metrics are no rollups but tracked individually and thus are not affected.

Call for review @cadonna @abbccdda @guozhangwang

@mjsax mjsax added the streams label Mar 25, 2020
@guozhangwang
Copy link
Copy Markdown
Contributor

I thought we are still going to retain the thread-level commit-latency, by making its own recording calls than relying on its children metrics (which are removed now), is that the case? Or are you planning to add it in another PR?

I’d suggest we use one PR to do this refactoring rather than two PRs to remove it and then add it back.

Copy link
Copy Markdown

@abbccdda abbccdda left a comment

Choose a reason for hiding this comment

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

LGTM

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 26, 2020

I thought we are still going to retain the thread-level commit-latency, by making its own recording calls than relying on its children metrics (which are removed now), is that the case? Or are you planning to add it in another PR?

We do. As explained in the PR description:

The thread level commit metrics are no rollups but tracked individually and thus are not affected.

@guozhangwang
Copy link
Copy Markdown
Contributor

Maybe I'm missing sth here. Where do we record the AvgAndMaxLatency at thread level now?

@guozhangwang
Copy link
Copy Markdown
Contributor

LGTM! My previous comment was actually void so it should be good to go.

@mjsax mjsax force-pushed the kafka-9441-kip-447-metrics-cleanup branch from 55eb45f to b69f3ab Compare March 27, 2020 20:42
@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 27, 2020

Rebased to resolve merge conflict.

Retest this please.

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 28, 2020

Java. 8 passed.
Java 11 kafka.api.ConsumerBounceTest.testRollingBrokerRestartsWithSmallerMaxGroupSizeConfigDisruptsBigGroup

Retest this please.

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 28, 2020

QueryableStateIntegrationTest failed for both runs.

Retest this please

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 29, 2020

Java 8 passed:
Java 11:

QueryableStateIntegrationTest.concurrentAccesses
RecordCollectorTest.shouldNotThrowStreamsExceptionOnSubsequentCallIfASendFailsWithContinueExceptionHandler

Retest this please.

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 30, 2020

Java 8: QueryableStateIntegrationTest.concurrentAccesses
Java 11 passed.

Copy link
Copy Markdown
Member

@cadonna cadonna left a comment

Choose a reason for hiding this comment

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

@mjsax Thank you for the PR

Overall LGTM

I have just one request regarding the test you removed in ThreadMetricsTest.


verify(StreamsMetricsImpl.class, streamsMetrics);
assertThat(sensor, is(expectedSensor));
}
Copy link
Copy Markdown
Member

@cadonna cadonna Mar 31, 2020

Choose a reason for hiding this comment

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

req: Please keep this test and do only remove the following part (and of course the parts that become obsolete):

StreamsMetricsImpl.addAvgAndMaxToSensor(
            expectedSensor,
            TASK_LEVEL_GROUP,
            tagMap,
            operationLatency,
            avgLatencyDescription,
            maxLatencyDescription
        );

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ack. Good call.

@mjsax mjsax merged commit 6a49ede into apache:trunk Apr 1, 2020
@mjsax mjsax deleted the kafka-9441-kip-447-metrics-cleanup branch April 1, 2020 03:07
@mjsax mjsax added the kip Requires or implements a KIP label Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kip Requires or implements a KIP streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants