Repository navigation
fix: preserve Unicode tag names when listing dataset tags - #11352
Conversation
Xuanwo
left a comment
There was a problem hiding this comment.
AI-assisted technical review of 59ecd878 — compatibility blocker
Datasets written by 14.0.3 or by the parent of this change can contain two stored tag records that both decode to é, referencing versions 1 and 2, alongside an unrelated release tag. The OpenDAL baseline enumerates all three records. With the reviewed CI wheel, ordered and unordered listing both fail on native S3 and OpenDAL with Multiple files for the same tag. Callers lose access to release through listing as well.
Please preserve compatible reads in the core tag layer. Cleanup uses tag listing to identify protected versions, so choosing either é record would omit the other version. Add a regression that reads pre-fix data, checks that release remains visible through both listing APIs, and verifies that cleanup sees both referenced versions. Rebase the tag change after #11351 lands.
Recover the logical tag name before reading its metadata through the canonical dataset path. Reject ambiguous listings so version retention sees the same tag names and versions as direct lookup.
59ecd87 to
19f9b88
Compare
19f9b88 to
bdb5f03
Compare
There was a problem hiding this comment.
✅ Gate recommendation: approve.
Reading tag contents from their listed locations fixes Unicode listing. The historical duplicate-tag concern is addressed: every record remains visible to cleanup, and when records collide, the logical name selects the snapshot used by lookup and deletion. The listing prerequisite #11351 has merged.
Creating a legal tag such as
écan make listing fail for the whole dataset, including unrelated ASCII tags. The reader reconstructs a path from a storage filename and escapes it twice.Read each tag from the object location returned by the listing. Decode the filename separately for the public name. When historical records decode to the same name, give that name to the record addressed by tag lookup and deletion. Return the other records under distinct, listing-only escaped keys so cleanup sees every tagged version. This uses the file locations provided by #11351.
The regression fixture was written by Lance 14.0.3 using native S3 and OpenDAL. It contains two records for
épointing to versions 1 and 2, plusreleaseat version 3. The tests check both listing APIs, run cleanup against versions 1 and 2, and reopen both snapshots. Each S3 adapter also lists, looks up and deletes its own record while preserving the other version. Further tests cover directory namespace listing and both directions of an S3 adapter switch.If only the other S3 adapter's record remains, listing still returns the Unicode name. Direct lookup by that name can return “tag does not exist” on the current adapter. To remove that record, use the original Unicode name through the adapter that wrote it.