Enhance locate-object output #1713

Open
opened 2025-04-10 00:41:56 +00:00 by elebedeva · 0 comments
Member

Related to #1635

Currently, the frostfs-cli control locate-object command returns a flat list of shards containing an object, but lacks important details when the object is either:

  1. Split into multiple parts
  2. Stored under erasure coding (EC) policy

In these cases, users cannot determine:

  • Which specific shard contains which part of the object
  • The mapping between object parts/chunks and their respective storage locations

Suggested output example:

Object: <object_id>
  Parts:
    - <part_id_1> / <chunk_id_1>
      Shards:
        - shard_id_1
        - shard_id_2
    - <part_id_2> / <chunk_id_2>
      Shards:
        - shard_id_3

Describe the solution you'd like

I see two possible solutions:

1. On frostfs-cli level

  1. Modify ListShardsForObject() to return ECInfoError and SplitInfoError
  2. In CLI command:
    • Make standard shard location request
    • If errors indicate split/EC object:
      • Extract parts/chunks information from errors
      • Make additional HEAD requests for each part (like in object nodes)
      • Aggregate and display complete mapping

2. On Control service level

Enhance ListShardsForObject() to:

  • Return structured response with complete mapping (object/part/chunk to the list of shards containing it)
    • In Storage Engine iterate through node's shards
    • If we get ECInfoError and/or SplitInfoError, break iterations
    • Extract psrts/chunks from errors
    • Iterate through list of shards for every found part/chunk
  • Pretty print response in CLI

Describe alternatives you've considered

Leave everything as is.

## Is your feature request related to a problem? Please describe. Related to #1635 Currently, the `frostfs-cli control locate-object` command returns a **flat** list of shards containing an object, but lacks important details when the object is either: 1. Split into multiple parts 2. Stored under erasure coding (EC) policy In these cases, users cannot determine: - Which specific shard contains which part of the object - The mapping between object parts/chunks and their respective storage locations Suggested output example: ``` Object: <object_id> Parts: - <part_id_1> / <chunk_id_1> Shards: - shard_id_1 - shard_id_2 - <part_id_2> / <chunk_id_2> Shards: - shard_id_3 ``` <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when ... --> ## Describe the solution you'd like I see two possible solutions: ### 1. On `frostfs-cli` level 1. Modify `ListShardsForObject()` to return `ECInfoError` and `SplitInfoError` 2. In CLI command: - Make standard shard location request - If errors indicate split/EC object: - Extract parts/chunks information from errors - Make additional `HEAD` requests for each part (like in `object nodes`) - Aggregate and display complete mapping ### 2. On `Control service` level Enhance `ListShardsForObject()` to: - Return structured response with complete mapping (object/part/chunk to the list of shards containing it) - In `Storage Engine` iterate through node's shards - If we get `ECInfoError` and/or `SplitInfoError`, break iterations - Extract psrts/chunks from errors - Iterate through list of shards for every found part/chunk - Pretty print response in CLI <!-- A clear and concise description of what you want to happen. --> ## Describe alternatives you've considered <!-- A clear and concise description of any alternative solutions or features you've considered. --> Leave everything as is.
elebedeva added the
frostfs-cli
triage
labels 2025-04-10 00:41:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1713
No description provided.