Skip to content

object: add __NEOFS__ASSOCIATE object attribute#337

Merged
carpawell merged 1 commit intomasterfrom
feat/lock-and-ts-with-no-payload
Jul 8, 2025
Merged

object: add __NEOFS__ASSOCIATE object attribute#337
carpawell merged 1 commit intomasterfrom
feat/lock-and-ts-with-no-payload

Conversation

@carpawell
Copy link
Member

It obsoletes old LOCK- and TOMBSTONE-typed objects with strictly typed messages in their payloads. Closes #312, closes #311.

@carpawell carpawell self-assigned this Jun 26, 2025
@carpawell carpawell marked this pull request as ready for review June 27, 2025 14:07
16 byte UUIDv4 used to identify the split object hierarchy parts
* $Object:split.first \
object_id of the first part in split chain; non-acceptable for deprecated V1 split scheme
* $Object:target \
Copy link
Contributor

Choose a reason for hiding this comment

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

with __NEOFS__TARGET attribute this wouldnt've been needed. Any reason to not do it?

Copy link
Member Author

Choose a reason for hiding this comment

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

this is a core feature for me with a certain type and non-string original representation. i feel it the same way as oid or other fields. likely all the necessary fields can be placed in the attributes in their string form, and SN may be forced to validate them, but what for?

Copy link
Member Author

Choose a reason for hiding this comment

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

i am also not a fan of expiration epoch as an attribute, i do not understand it

Copy link
Contributor

@cthulhu-rider cthulhu-rider Jun 27, 2025

Choose a reason for hiding this comment

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

to get backward and forward compatibility on serialization (incl. signatures) and search

from protobuf pov, fields are more preferable to me as well. But they are harder to support

Copy link
Member Author

Choose a reason for hiding this comment

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

compatibility

i can understand it, but i do not want to see it we would do it from scratch. we do not have compatibility anyway, since the old TS/LOCK will just die in any case

Copy link
Member Author

Choose a reason for hiding this comment

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

the same way, locking many objects with a single LOCK object will not be acceptable. non-compatible either

Copy link
Member Author

Choose a reason for hiding this comment

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

@roman-khimov, thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

__NEOFS__ASSOCIATE

// Position of the object in the split hierarchy
Split split = 11 [json_name = "split"];

// Target object for typed system objects only, ignored otherwise:
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd prohibit, not ignore. Setting this in regular or LINK objects doesn't seem smth valid

if necessary, we'll weaken the requirement

Copy link
Member

Choose a reason for hiding this comment

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

BTW, for LINK this makes total sense. Especially wrt placement. Having a LINK on all machines that are supposed to hold big ID is beneficial for performance.

Copy link
Contributor

Choose a reason for hiding this comment

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

LINKs have parent ID. If we want to tune placement rules for some objects by this field, this must be documented here

@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from f579ffb to 185df56 Compare July 8, 2025 13:48
@carpawell carpawell changed the title object: add target field object: add __NEOFS__ASSOCIATE object attribute Jul 8, 2025
@carpawell carpawell requested a review from cthulhu-rider July 8, 2025 13:50
It obsoletes old LOCK- and TOMBSTONE-typed objects with strictly typed messages
in their payloads. Closes #312, closes #311.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from 185df56 to 6d934fb Compare July 8, 2025 14:15
@carpawell carpawell merged commit 8ff930a into master Jul 8, 2025
3 checks passed
@carpawell carpawell deleted the feat/lock-and-ts-with-no-payload branch July 8, 2025 15:42
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.

Limit LOCK members number to one Limit TOMBSTONE members number to one

3 participants