You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Alieh Saeedi (Jira)" <ji...@apache.org> on 2026/03/03 12:54:00 UTC

[jira] [Created] (KAFKA-20249) Optimize rawValue methods across all Deserializers

Alieh Saeedi created KAFKA-20249:
------------------------------------

             Summary: Optimize rawValue methods across all Deserializers
                 Key: KAFKA-20249
                 URL: https://issues.apache.org/jira/browse/KAFKA-20249
             Project: Kafka
          Issue Type: Sub-task
            Reporter: Alieh Saeedi


Optimize rawValue/{{{}rawAggregationValue{}}} to fast-path the common case of empty headers in headers-aware  state stores, while preserving correct behavior for non-empty headers.
h3. Background

In the current header-aware state store encoding, the value layout is:
 * 1st byte: header-length prefix (or start of varint-encoded header size)

 * Next {{N}} bytes: serialized headers

 * Remaining bytes: aggregation value (payload)

Most state store records are expected to have no headers, so optimizing the empty-headers case reduces overhead in hot paths where we need to extract the raw aggregation value.
h3. Proposed Change

Introduce a specialized implementation of rawValue/{{{}rawAggregationValue{}}}:
```



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