Backport #29251 to branch v25.2.x. This issue was created as a placeholder because the original PR's commit(s) could not be automatically cherry-picked.
Here are the commands to execute:
git checkout v25.2.x
git checkout -b manual-backport-29251-v25.2.x-146
git cherry-pick -x c7c8c5c2e2 efc3a22e26 7f506e3c94
git push origin manual-backport-29251-v25.2.x-146
gh pr create \
--title "[v25.2.x] Fix case where messages can be written multiple times in Iceberg" \
--base "v25.2.x" \
--label "kind/backport" \
--head "manual-backport-29251-v25.2.x-146" \
--draft \
--repo "redpanda-data/redpanda" \
--milestone "v25.2.x-next" \
--body "Backport of PR https://github.com/redpanda-data/redpanda/pull/29251 "