Skip to content

[v25.3.x] shadowing/write_at_offset_stm: ensure_truncatable API#29446

Merged
bharathv merged 8 commits into
redpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-29358-v25.3.x-543
Jan 30, 2026
Merged

[v25.3.x] shadowing/write_at_offset_stm: ensure_truncatable API#29446
bharathv merged 8 commits into
redpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-29358-v25.3.x-543

Conversation

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Backport of PR #29358

No logical changes, templatized the ghost batch utility on batch type

(cherry picked from commit f2653de)
Without this the sink may be having a wrong last_replicated_offset from
the last inflight replication which has eventually failed. We will end
up reset-ing source to wrong offset.

(cherry picked from commit 8929eff)
Prefix truncation is a rare op, it is ok to do it inline with
replication. Now that we have the ability to do offset only fetches in
the client, we don't need a periodic timer loop to do it.

(cherry picked from commit 0dcd6a4)
The client was returning an empty batch when the start offset changed.
These were getting filtered out in the data_queue, so the notification
never reached the replicator and truncation didn’t happen.
With this change, an empty batch is treated as valid data. It still gets
filtered out by the replicator, but now it triggers prefix truncation

This issue was masked until now because there was a periodic truncation
async loop that invoked prefix_truncation on a timer. Now that the
previous commit removed it, this issue surfaced.

(cherry picked from commit f3506e4)
@vbotbuildovich vbotbuildovich added this to the v25.3.x-next milestone Jan 28, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 28, 2026

@michael-redpanda michael-redpanda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clean backport

@bharathv bharathv marked this pull request as draft January 28, 2026 19:19
auto-merge was automatically disabled January 28, 2026 19:19

Pull request was converted to draft

@vbotbuildovich

vbotbuildovich commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator Author

Retry command for Build#79796

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/cluster_linking_e2e_test.py::ShadowLinkingReplicationTests.test_start_offset_catch_up@{"source_cluster_spec":{"cluster_type":"redpanda"},"with_failures":false}
tests/rptest/tests/cluster_linking_e2e_test.py::ShadowLinkingReplicationTests.test_start_offset_catch_up@{"source_cluster_spec":{"cluster_type":"kafka","kafka_quorum":"COMBINED_KRAFT","kafka_version":"3.8.0"},"with_failures":false}
tests/rptest/tests/cluster_linking_e2e_test.py::ShadowLinkingReplicationTests.test_start_offset_catch_up@{"source_cluster_spec":{"cluster_type":"redpanda"},"with_failures":true}

@vbotbuildovich

Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#79796
test_class test_method test_arguments test_kind job_url test_status passed reason test_history
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "kafka", "kafka_quorum": "COMBINED_KRAFT", "kafka_version": "3.8.0"}, "with_failures": false} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c0616-8e62-4133-882c-8ee46e5d71ac FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "kafka", "kafka_quorum": "COMBINED_KRAFT", "kafka_version": "3.8.0"}, "with_failures": false} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c061c-ddfb-4f3e-aa83-8d1b990762d4 FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "redpanda"}, "with_failures": false} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c0616-8e63-43b7-ba00-9316d12ddb7c FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "redpanda"}, "with_failures": false} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c061c-ddfc-4e16-b916-03072a0a3b93 FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "redpanda"}, "with_failures": true} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c0616-8e5b-4440-9d46-406410d3fdfa FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
ShadowLinkingReplicationTests test_start_offset_catch_up {"source_cluster_spec": {"cluster_type": "redpanda"}, "with_failures": true} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c061c-ddf0-45aa-9642-bb7744bbb340 FAIL 0/11 The test was found to be new, and no failures are allowed https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=ShadowLinkingReplicationTests&test_method=test_start_offset_catch_up
NodeDecommissionSpaceManagementTest test_decommission {"single_partition": true} integration https://buildkite.com/redpanda/redpanda/builds/79796#019c061c-ddf0-45aa-9642-bb7744bbb340 FLAKY 10/11 Test PASSES after retries.No significant increase in flaky rate(baseline=0.0000, p0=1.0000, reject_threshold=0.0100. adj_baseline=0.1000, p1=0.3487, trust_threshold=0.5000) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=NodeDecommissionSpaceManagementTest&test_method=test_decommission

@bharathv

Copy link
Copy Markdown
Contributor

failures should be gone with #29467 because offset only fetches drive truncation.

@bharathv

Copy link
Copy Markdown
Contributor

/dt

@bharathv bharathv marked this pull request as ready for review January 30, 2026 22:50
@bharathv bharathv merged commit f1dbaaa into redpanda-data:v25.3.x Jan 30, 2026
20 checks passed
@piyushredpanda piyushredpanda modified the milestones: v25.3.x-next, v25.3.7 Feb 6, 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.

4 participants