fix: recreating an existing namespace with OPTIMIZED_SIBLING_CHECK is a conflict - #5596
Conversation
dimas-b
left a comment
There was a problem hiding this comment.
LGTM 👍 Thanks, @andybradshaw !
ayushtkn
left a comment
There was a problem hiding this comment.
Thanx @andybradshaw for the fix, I think the title is wrong. It says recreating an existing table but the fix is recreating the namespace, the CHANGELOG is correct.
The table path may still have a gap. The same-name exclusion
exists only in the fallback — the optimized path has no equivalent. And for tables, validateNoLocationOverlap
builds a virtual IcebergTableLikeEntity with no persisted id, so nothing could exclude the real one even with #5520's ancestor filtering. A sequential recreate won't show this — Iceberg's create() checks ops.current() and 409s first — but where a create reaches doCommit(null, …) with the entity already present, mainly concurrent same-name creates, the optimized path can surface 403 instead of 409. That also skips the AlreadyExistsException catch used for idempotency replay.
I think we should update the title to say it is namespace & maybe chase the table path as a followup.
|
Good point about follow-up from @ayushtkn Are we ok to merge this PR "as is" and do further improvements on |
Split out of #5520 as a separate PR, addressing the HTTP status code portion of #5521.
Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)