Extend PatchRequest.Body with new_split_header field #81

Merged
fyrchik merged 1 commit from aarifullin/frostfs-api:fix/patch_split into master 2025-03-26 12:29:21 +00:00

View file

@ -891,6 +891,10 @@ message PatchRequest {
// key, then it just replaces it while merging the lists.
bool replace_attributes = 3;
dkirillov marked this conversation as resolved Outdated

Do we decided add only split header, not any other system attributes?

Do we decided add only split header, not any other system attributes?

True, but I have changed my mind:

  1. I don't think these fields should become changeable for an object. Currently, we're trying to create a workaround to make an object related to other objects in frostfs. If we let a client patch attributes like ContainerID and OwnerID, then the result will be unpredictable (or it'll be a huge disaster)
  2. After our discussion I found that patching split_header is enough and no other system attribute is required to get patched. Initially my concern was to take into account all necessary fields
True, but I have changed my mind: 1. I don't think [these fields](https://git.frostfs.info/TrueCloudLab/frostfs-api/src/branch/master/object/types.proto#L80-L110) should become changeable for an object. Currently, we're trying to create a workaround to make an object related to other objects in frostfs. If we let a client patch attributes like `ContainerID` and `OwnerID`, then the result will be unpredictable (or it'll be a huge disaster) 2. After our discussion I found that patching `split_header` is enough and no other system attribute is required to get patched. Initially my concern was to take into account all necessary fields

I don't think these fields should become changeable for an object.

The same thing was being said about splitheader some time ago :)

>I don't think these fields should become changeable for an object. The same thing was being said about splitheader some time ago :)

I don't mind adding this field explicitly, but we need to be sure that it is enough for the usecase we are trying to support.

I don't mind adding this field explicitly, but we need to be sure that it is enough for the usecase we are trying to support.
// New split header for the object. This defines how the object will relate
// to other objects in a split operation.
neo.fs.v2.object.Header.Split new_split_header = 5;
// The patch for the object's payload.
message Patch {
// The range of the source object for which the payload is replaced by the