Repository navigation
Conversation
Introduce an opt-in on-disk object naming mode selected at first format with --object-naming=extended or MINIO_OBJECT_NAMING=extended. Object keys are escaped and regular objects carry a terminal marker on disk, so an object directory can never double as another key's parent: obj1 and obj1/obj2 coexist, both appear in LIST results, and exact-key reads, writes and deletes stay independent. - The mode is persisted in every drive's format.json and verified across drives, pools and nodes; mixed modes are rejected at startup and the mode cannot be changed afterwards. - The walk decodes and re-sorts each directory level in the user domain because the terminal marker sorts after '/' on disk; the merge layer keeps object and prefix entries with distinct names. - Object names are transformed at the pooled object-layer boundary, so composite paths (object/DataDir/part.N) and meta-bucket layouts are untouched. Default (safe) mode keeps its existing behavior and disk layout. - The scanner decodes disk names for lifecycle/replication evaluation and object API calls; the rebrand compatibility baseline records the new identifier. Co-Authored-By: Claude Code <noreply@anthropic.com> Signed-off-by: liubin <liubin07@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
extendedobject naming mode to Silo, seeded with--object-naming=extended/MINIO_OBJECT_NAMING=extendedon a cluster'sfirst start. The mode removes the long-standing "conflicting objects" listing
limitation: an object and a prefix of the same name (
obj1andobj1/obj2)can coexist, both appear in LIST results, and exact-key reads, writes and
deletes stay independent.
On disk, user keys are escaped (
␣⫽◖◗◊◉◈◇◆⬡→␣0…␣9) and regular objectscarry a terminal marker, so
obj1is stored atobj1◊/xl.metawhileobj1/remains a plain prefix directory. An object directory can therefore never
double as another key's parent — the structural invariant that safe mode
cannot provide. Directory objects keep the legacy
__XLDIR__representation.Design notes
upstream already applies
encodeDirObject. This keeps composite paths builtby the erasure layer (
object/DataDir/part.N,object/<uuid>) and everymeta-bucket (
.minio.sys) layout untouched. The storage layer stays entirelyin the disk domain.
/in UTF-8 byteorder, so disk order is not S3 key order. The walk decodes and re-sorts each
directory level in the user domain and recurses inline, keeping the stream
ascending; for the same name a directory object precedes its prefix. The
merge layer compares exact names in this mode so
obj1andobj1/are bothretained, while the object-over-directory rule still applies to
X/vsX/.format.json(objectNaming),verified per drive, per pool, and across nodes (existing bootstrap env
comparison), and rejected on mismatch at startup. Fresh clusters only; the
mode cannot be changed or migrated in place.
documented conflicting-objects limitation are all preserved.
Testing
cmd/object-naming_test.go): encode/decoderound-trips and escape order preservation; the full conflict matrix
(delimiter + root, recursive, prefix and exact-key listing, pagination and
marker resume, parent delete/overwrite leaving the child intact, heal);
versioned bucket with delete markers; object + directory object + child
coexistence; names containing reserved characters; multipart completion onto
a conflicting key;
format.jsonpersistence and mode-mismatch rejection;safe-mode behavior lock-in.
decommission/rebalance, heal, scanner/data-usage, bucket/config,
object-lock/tier/replication and the HTTP API suites all pass.
MINIO_OBJECT_NAMING=extended, using a stock S3 client: all cases from theconflict analysis checklist (root delimiter, recursive,
prefix=obj1/,GET/HEAD, delete parent, overwrite parent) pass.
go build ./...,go vet ./cmd,gofmt,rebrand-guardandverify-rebrand.share clean (the compatibility baseline records the newMINIO_OBJECT_NAMINGidentifier).Note:
TestXLStorageVerifyFilepanics on this machine with Go 1.27.3(ringbuffer divide-by-zero) on the unmodified baseline as well; it is
unrelated to this change.
Docs
docs/minio-limits.mddocuments the mode, its restrictions (fresh clusteronly, no in-place migration, raw-drive tools such as
mc admin inspectmustuse encoded names, encoded-name length limits, no cross-mode replication) and
keeps the safe-mode limitation.
CHANGELOG.mdgains an Unreleased entry. Companion-site documentationfollows in the
silo.pgsty.comrepository.