From bc7b49eed23af4b5147745374bc1d9c94630440e Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Wed, 8 May 2024 15:03:29 +0300 Subject: [PATCH] [#82] object: Introduce new fields for EC header * Regenerate protobufs as frostfs-api introduced `parent_split_id` and `parent_split_index` fields. * Fix marshaller and converter for EC header. * Extend v2 type `ECHeader` with `ParentSplitID` and `ParentSplitIndex` fields. * Fix message_test for `Object`. Also generate EC headers and check it. Signed-off-by: Airat Arifullin --- object/convert.go | 4 ++++ object/grpc/service.pb.go | Bin 148314 -> 148482 bytes object/grpc/types.pb.go | Bin 49981 -> 51227 bytes object/marshal.go | 8 ++++++- object/message_test.go | 4 +++- object/test/generate.go | 44 +++++++++++++++++++++++++++----------- object/types.go | 14 ++++++------ 7 files changed, 54 insertions(+), 20 deletions(-) diff --git a/object/convert.go b/object/convert.go index f19cc09d..5b4acda8 100644 --- a/object/convert.go +++ b/object/convert.go @@ -269,6 +269,8 @@ func (h *ECHeader) ToGRPCMessage() grpc.Message { m = new(object.Header_EC) m.Parent = h.Parent.ToGRPCMessage().(*refsGRPC.ObjectID) + m.ParentSplitId = h.ParentSplitID + m.ParentSplitIndex = h.ParentSplitIndex m.Index = h.Index m.Total = h.Total m.Header = h.Header @@ -300,6 +302,8 @@ func (h *ECHeader) FromGRPCMessage(m grpc.Message) error { } } + h.ParentSplitID = v.GetParentSplitId() + h.ParentSplitIndex = v.GetParentSplitIndex() h.Index = v.GetIndex() h.Total = v.GetTotal() h.Header = v.GetHeader() diff --git a/object/grpc/service.pb.go b/object/grpc/service.pb.go index 2bfb50bc985ef472d9736ae98b1a7eae5cdcf766..75d359e9ab984896c3739f747c73fb16f8eb3b2f 100644 GIT binary patch delta 185 zcmXwyu?oU46h(2YUvUR<(sp+h2PeTW6E3Q*$OtpqDTl>){utbz5;YW5a+pqB67acb_a1-%+Wfd z=``tO3#RR_qeQ$eqwv4i7g+j{XNi7np)7O-ql3WJP{t%;l%$W8r6$@#$giP$hHmg) Fe*n;zK&=1( delta 18 acmZqb;JnqwxuNVsv)sq+avvF=1OWh4@(CgU diff --git a/object/grpc/types.pb.go b/object/grpc/types.pb.go index 8f4f383cbac718b637f7954ac5a0bbc06faa5532..254e76d54648f5eea7ac4d52b6fc05b6b1be79a5 100644 GIT binary patch delta 1417 zcmZ`%U2Icj7|u32*1GJEm32RE-*(uFSh}|CmrWD_k&uNMFiOa5&e~JjQO_wor?9|~ z7#4&X+S-S$uH8?&5$^=eOhh6mCjML)6K^zLEShkkiHV>WTnTvI?`*@wcysc-@AJOT z&-b01=Zmt*q7Qx@I%{rkXFFA<1tq3LLq|h0Q-((*pTTaOke{hRB^LG*wJK@) z{2+ILPYyoaZUJm*%^{1gODh7asI|FdVTTGn+eF%f2R-{hb z@aUaV{BWuYSL4-%di%jShSQ1CYMn{v_xK(Yxji~jC$`6JMD%T^ezQCZ^QbiNJ@W@_->Ta2V)DFHXfnlY9(r{WeoH&a600&Oo6 z=WMuj;WaEQw&LzgDZa!uf^J`~!~XM4$c0PstbWc-I?;Zq9xqSW2$m=8xO2IOjt!Fn zYE$(%GTBV!@e2dEG*U&!U*6t>CsK8EbcL(S+&zy2y1L<3ok&iV6PlY6(4*S%`;?W+ zg0z4GaWh6UR_sbQ!ZW@RC(`AHaT~5pRbk6`BYsSm7cl&m?kl5r=;o=rI~)vup4f_8 zZyd#|37$Qo+kTL?p>Em%N2UQ5H)R_N(BVE6Qscrn9+jAR6zK9T7w zCVH0}x8H2RUzuKV`2Dzmvu8FUkZq&#QdU4FqYCb;tCzBO zbY&IfWc=jKbxnmFY88?d07X%ai!U61GXt(%zRySpBUZklP7WvBZ kNF8Pt&G=aV5x-unC;mGeFS%k|az`%)63(TQSH5ce2ehZ}Pyhe` delta 778 zcmXYvT}V@L7{*a|VmpqVp&L`r{Ma0J(UQ%kx&DRT)RkmG5)@%2Nf&8;;_QQpWLB1) z?U9^2({nbRTUSPl=sPMBgsgSZjZmzcq8rJZATsFu|LgAj-uHdp^SsYFvQ+duSak3E z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