Fix SetMarshalData for PutSingle request #65

Merged

Allow to reset marshal data also for put single request

Allow to reset marshal data also for put single request
dstepanov-yadro force-pushed fix/put_single_request_marshal_data from 4cafb5342c to 2e83fecbdc 2024-02-15 12:42:37 +00:00 Compare
dstepanov-yadro requested review from storage-core-committers 2024-02-15 12:42:49 +00:00
dstepanov-yadro requested review from storage-core-developers 2024-02-15 12:42:50 +00:00
dstepanov-yadro force-pushed fix/put_single_request_marshal_data from 2e83fecbdc to 634e24aba7 2024-02-15 12:44:16 +00:00 Compare
fyrchik reviewed 2024-02-15 12:44:36 +00:00
@ -287,6 +287,11 @@ func NestedStructureSetMarshalData[T any, M setMarshalData[T]](field int64, pare
return 0
}
if parentData == nil {
Owner

How is this related?

How is this related?
Author
Member

Now r.marshalData can be nil

func (r *PutSingleRequestBody) SetMarshalData(data []byte) {
	if r == nil {
		return
	}

	r.marshalData = data

	proto.NestedStructureSetMarshalData(putSingleReqObjectField, r.marshalData, r.object)
}

So if parentData == nil then we should reset nested marshalData

Now `r.marshalData` can be `nil` ``` func (r *PutSingleRequestBody) SetMarshalData(data []byte) { if r == nil { return } r.marshalData = data proto.NestedStructureSetMarshalData(putSingleReqObjectField, r.marshalData, r.object) } ``` So if `parentData == nil` then we should reset nested marshalData
fyrchik approved these changes 2024-02-15 13:43:08 +00:00
aarifullin approved these changes 2024-02-15 14:07:57 +00:00
dstepanov-yadro merged commit 634e24aba7 into master 2024-02-15 14:10:46 +00:00
dstepanov-yadro deleted branch fix/put_single_request_marshal_data 2024-02-15 14:10:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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-api-go#65
No description provided.