Skip to content

[v25.3.x] kafka: fix partition_response for LogAppendTime topics#29301

Merged
WillemKauf merged 2 commits intoredpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-29286-v25.3.x-246
Jan 16, 2026
Merged

[v25.3.x] kafka: fix partition_response for LogAppendTime topics#29301
WillemKauf merged 2 commits intoredpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-29286-v25.3.x-246

Conversation

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

Backport of PR #29286
Fixes: #29299,

According to the Kafka protocol,

```
https://github.com/redpanda-data/redpanda/blob/dev/src/v/kafka/protocol/schemata/produce_response.json
The timestamp returned by broker after appending the messages.
If CreateTime is used for the topic, the timestamp will be -1.
If LogAppendTime is used for the topic, the timestamp will be
the broker local time when the messages are appended.
```

Unfortunately we were not setting this field correctly in the `partition_response`
for `LogAppendTime` topics, leading Kafka clients to always interpret
the response as `CreateTime`.

Fix it by setting `log_append_time_ms` in the `partition_response`
to the batch's `max_timestamp` (which will have been set to the broker's
time at this point) before returning the response to the client in the
produce path.

(cherry picked from commit 74b1d98)
@vbotbuildovich vbotbuildovich added this to the v25.3.x-next milestone Jan 16, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 16, 2026
@WillemKauf WillemKauf enabled auto-merge January 16, 2026 16:38
@vbotbuildovich
Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#79172
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
MountUnmountIcebergTest test_simple_remount {"cloud_storage_type": 1} integration https://buildkite.com/redpanda/redpanda/builds/79172#019bc78b-b5c7-4e15-afa2-989ab2475fe3 FLAKY 8/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.2162, p0=0.6712, reject_threshold=0.0100. adj_baseline=0.5185, p1=0.0428, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=MountUnmountIcebergTest&test_method=test_simple_remount
NodesDecommissioningTest test_decommission_status null integration https://buildkite.com/redpanda/redpanda/builds/79172#019bc787-4e88-4534-9c82-d4e9521a73b7 FLAKY 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0381, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1100, p1=0.3119, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=NodesDecommissioningTest&test_method=test_decommission_status
WriteCachingFailureInjectionE2ETest test_crash_all {"use_transactions": false} integration https://buildkite.com/redpanda/redpanda/builds/79172#019bc78b-b5d3-46c4-82fe-f71de4ebe7e5 FLAKY 9/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.1092, p0=0.6853, reject_threshold=0.0100. adj_baseline=0.2931, p1=0.1604, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=WriteCachingFailureInjectionE2ETest&test_method=test_crash_all

@WillemKauf WillemKauf merged commit f8ce791 into redpanda-data:v25.3.x Jan 16, 2026
19 checks passed
@tyson-redpanda tyson-redpanda modified the milestones: v25.3.x-next, v25.3.6 Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/redpanda kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants