You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Greg Harris (Jira)" <ji...@apache.org> on 2025/01/27 18:07:00 UTC
[jira] [Assigned] (KAFKA-17792) header parsing ends up timing out and using large quantities of memory if the string looks like a number
[ https://issues.apache.org/jira/browse/KAFKA-17792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Greg Harris reassigned KAFKA-17792:
-----------------------------------
Assignee: Martin Sillence
> header parsing ends up timing out and using large quantities of memory if the string looks like a number
> --------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-17792
> URL: https://issues.apache.org/jira/browse/KAFKA-17792
> Project: Kafka
> Issue Type: Bug
> Components: connect
> Reporter: Martin Sillence
> Assignee: Martin Sillence
> Priority: Blocker
> Fix For: 4.0.0, 4.1.0
>
>
> {color:#172b4d}We have trace headers such as:{color}
> {color:#172b4d}"X-B3-SpanId": "74320e6e26adc8f8"{color}
> {color:#172b4d}if however the value happens to be: "407127e212797209"{color}
> {color:#172b4d}This is then treated as a numeric value and it tries to convert this as a numeric representation and an exact value using BigDecimal{color}
> we end up with the trace:
> BigDecimal.setScale(int, RoundingMode) line: 2876
> Values$ValueParser.parseAsExactDecimal(BigDecimal) line: 1044
> Values$ValueParser.parseAsNumber(String) line: 1025
> Values$ValueParser.parseNextToken(boolean, String) line: 892
> Values$ValueParser.parse(boolean) line: 875
> Values.parseString(String) line: 415
> SimpleHeaderConverter.toConnectHeader(String, String, byte[]) line: 68
> WorkerSinkTask.convertHeadersFor(ConsumerRecord<byte[],byte[]>) line: 578
> this takes a long time to convert to an exact representation of a 212 billion digit integer
--
This message was sent by Atlassian Jira
(v8.20.10#820010)