Skip to content

object/GET: allow to fetch exact EC part in GET request#393

Merged
roman-khimov merged 1 commit into
masterfrom
feat/EC-GET-with-no-part-index
Jul 6, 2026
Merged

object/GET: allow to fetch exact EC part in GET request#393
roman-khimov merged 1 commit into
masterfrom
feat/EC-GET-with-no-part-index

Conversation

@carpawell

Copy link
Copy Markdown
Member

Closes #348.

@carpawell
carpawell force-pushed the feat/EC-GET-with-no-part-index branch from 9c0e665 to 8fe6ee4 Compare June 22, 2026 04:37
Comment thread object/service.proto Outdated
// `PlacementPolicy.ec_rules` list.
// If `__NEOFS__EC_PART_IDX` is also included in X-headers, node returns
// corresponding part, otherwise nodes returns any part for the rule
// described above it has (if more that one part were found, the order

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i find it dangerous when netmap is changing, and there could be policer's object changes. the same is about any form of GETRANGE

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multipart can be solved by returning "appropriate" (as per current placement) or lower index (if there is no appropriate) part.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multipart can be solved by returning "appropriate"

from which side? client or server? what if they are different? if we believe that netmap is ok (not changing right now) why is this optimisation needed at all?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only server (the one processing the request) can decide here.

Comment thread object/service.proto
// `__NEOFS__EC_PART_IDX` by object attribute format. Rule index MUST NOT
// exceed container's `PlacementPolicy.ec_rules` list. Part index MUST NOT
// exceed total part number in the indexed rule.
// - `meta_header.x_headers` includes `__NEOFS__EC_RULE_IDX` by object

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not do the same for GetRange?

@carpawell carpawell Jun 22, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as i stated in the thread above: i am afraid that we will have many problems with undefined requests (no part index x-headers) returning objects if no header is received in the same request (any GETRANGE/GET with range and payload_only) is not safe cause it is impossible to know what exact object was handled

Comment thread object/service.proto Outdated
// `PlacementPolicy.ec_rules` list.
// If `__NEOFS__EC_PART_IDX` is also included in X-headers, node returns
// corresponding part, otherwise nodes returns any part for the rule
// described above it has (if more that one part were found, the order

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

order is undefined

since parts are streamed to the client one-by-one, i think it is worth guaranteeing direct order. Is there any reason not to do so?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you suggest returning every part in the same GET request in case of any conflicts?

@roman-khimov roman-khimov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec is rather simple, however this raises questions over forwarding optimizations, these require strict ordering and we can end up with more simultaneous connections.

Comment thread object/service.proto Outdated
// `PlacementPolicy.ec_rules` list.
// If `__NEOFS__EC_PART_IDX` is also included in X-headers, node returns
// corresponding part, otherwise nodes returns any part for the rule
// described above it has (if more that one part were found, the order

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multipart can be solved by returning "appropriate" (as per current placement) or lower index (if there is no appropriate) part.

Comment thread object/service.proto Outdated
@carpawell
carpawell force-pushed the feat/EC-GET-with-no-part-index branch from 8fe6ee4 to 7746739 Compare June 26, 2026 10:51
Closes #348.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
@carpawell
carpawell force-pushed the feat/EC-GET-with-no-part-index branch from 7746739 to ee707f7 Compare June 26, 2026 13:37
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 2, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 3, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 3, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 3, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
@roman-khimov
roman-khimov merged commit 1c97329 into master Jul 6, 2026
3 checks passed
@roman-khimov
roman-khimov deleted the feat/EC-GET-with-no-part-index branch July 6, 2026 13:58
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 6, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
carpawell added a commit to nspcc-dev/neofs-node that referenced this pull request Jul 7, 2026
If X-Headers do not include EC part ID, SN fills it with an ID that it should
store according to current Netmap. It such part cannot be found, it will
return first part ID it has locally. This does not relate any form of GETRAGE
reques, both GET with RANGE and native GETRAGE. This commit implements
nspcc-dev/neofs-api#393.

Signed-off-by: Pavel Karpy <carpawell@nspcc.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to get EC chunk by rule idx only

3 participants