Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metrics for chunk transform/detransform latency #401

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeqo
Copy link
Contributor

@jeqo jeqo commented Sep 27, 2023

Depends on #400

@jeqo jeqo added the blocked Has a dependent PR/issue that is not merged/solved yet label Sep 27, 2023
@jeqo jeqo requested a review from a team as a code owner September 27, 2023 13:09
@jeqo jeqo force-pushed the jeqo/metrics-chunk-processing branch from 870791a to 8d83fd1 Compare September 27, 2023 13:13
@ivanyu ivanyu self-assigned this Sep 28, 2023
@jeqo jeqo force-pushed the jeqo/metrics-chunk-processing branch from 8d83fd1 to 56f35b6 Compare September 28, 2023 08:54

import org.apache.kafka.common.utils.Time;

public class MeteredInputStream extends InputStream {
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a problem with this implementation: direct inheritance from InputStream and overriding only read() will result in other read methods being implemented through read(), which is very inefficient, because it's by-byte.

I looked at this problem some time ago and here's my draft: https://github.com/Aiven-Open/tiered-storage-for-apache-kafka/tree/ivanyu/time-to-first-byte. Using FilterInputStream allows to override fewer methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the pointer! Yes, at the end other implementations use the read method, but as you mentioned it could be inefficient. Will revisit this then.

@jeqo jeqo force-pushed the jeqo/metrics-chunk-processing branch from 56f35b6 to 139d7a3 Compare September 28, 2023 09:29
@jeqo jeqo marked this pull request as draft September 28, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Has a dependent PR/issue that is not merged/solved yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants