Files
seaweedfs/weed/admin/view/app
Chris LuandClaude Opus 5.5 ef633dcc4d admin: inspect an S3 object's versions, retention and chunk volume health (#13078)
* admin: inspect an S3 object's versions, retention and chunk volumes

For a bucket and key, collect the base entry and every entry under
<key>.versions, decode version id, delete marker, ETag, client checksum,
Object Lock mode, retain-until, legal hold and the WORM enforcement time,
and map each chunk to its volume. One filtered VolumeList then reports,
per volume, replicas present versus the replica placement, or the EC
shards present and missing against the data shard count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: serve the S3 object inspection at /api/s3/buckets/{bucket}/objects/inspect

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: add an Inspect Object page for a bucket and key

/object-store/buckets/{bucket}/inspect?key= renders the inspection:
volume health per chunk volume with a link to the volume or EC volume
page, then every version with size, mtime, ETag, client checksum, lock
mode, retain-until, legal hold, WORM time and its chunk file ids.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: link each bucket to the object inspector

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: inspect a key that is also a prefix of other keys

The filer keeps such an object on a directory entry marked as a prefix
object, so the base entry lookup must accept it like a file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: count only S3 version entries as an object's history

A sibling named <key>.versions is history only when it is a directory,
and only children with a version id (attribute or v_ file name, as
VersionIdFromEntry reads them) are versions. Without a base object or
any such version the inspection is not found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: mark the newest version latest when the pointer is missing

When the base object is gone and .versions has no latest pointer (for
example after deleting a current null version), pick the latest with the
S3 gateway's own version ordering, exported as SelectLatestVersionId,
instead of leaving every version noncurrent. A truncated listing marks
none, since it may not hold the newest version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: report the ETag the S3 gateway returns

Use objectETag, exported as ObjectETag, so remote-only entries show
their remote ETag and entries without a stored ETag or MD5 show the
chunk-derived one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: read the buckets path with the inspection's request context

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: report the filer's logical size for each inspected version

filer.FileSize also covers chunk extents past a stale attribute size and
a newer remote size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: drop EC shard state once a volume also reports a replica

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: let the latest-version pointer outrank the null-is-latest flag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: page the inspector's version scan past non-version entries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* admin: judge an inspected EC volume by its newest encode run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:43:19 -08:00
..