object: Introduce new fields for ECHeader type #223

Merged
fyrchik merged 3 commits from aarifullin/frostfs-sdk-go:feat/ecHeader_parentSplit into master 2024-05-20 09:53:37 +00:00
Collaborator
  • go.mod: Update frostfs-api-go/v2 version;
  • Introduce ec_parent search filter;
  • Introduce parentSplitID, parentSplitParentID fields for ECHeader;
  • Fix ECHeader's constructor;
  • Fix Split and Reconstruct;
  • Add unit-tests.
* go.mod: Update frostfs-api-go/v2 version; * Introduce `ec_parent` search filter; * Introduce `parentSplitID`, `parentSplitParentID` fields for `ECHeader`; * Fix ECHeader's constructor; * Fix `Split` and `Reconstruct`; * Add unit-tests.
aarifullin added 3 commits 2024-05-14 12:11:51 +00:00
edd2cfbc39 [#XX] go.mod: Update frostfs-api-go/v2 version
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
59f52f3b04 [#XX] object: Introduce `ec_parent` search filter
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
DCO / DCO (pull_request) Failing after 1m9s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m17s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m28s Details
Tests and linters / Lint (pull_request) Successful in 3m3s Details
6d43e166ed
[#XX] object: Introduce new fields for `ECHeader`
* Add `parentSplitID`, `parentSplitIndex` and setters/getters
  for them;
* Fix `NewECHeader` constructor;
* Add unit-test for Split with ec-parents case.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
aarifullin force-pushed feat/ecHeader_parentSplit from 6d43e166ed to 3c78222892 2024-05-14 12:12:33 +00:00 Compare
aarifullin requested review from fyrchik 2024-05-14 12:12:37 +00:00
aarifullin requested review from storage-core-committers 2024-05-14 12:12:38 +00:00
aarifullin requested review from storage-core-developers 2024-05-14 12:12:46 +00:00
aarifullin reviewed 2024-05-14 12:14:27 +00:00
@ -27,0 +32,4 @@
chld := obj.Parent().Children()
for i := range chld {
if chld[i].Equals(objID) {
parentSplitIndex = uint32(i)
Poster
Collaborator

@fyrchik, please, could you fix me if this is an incorrect way to define the index within big Split?

@fyrchik, please, could you fix me if this is an incorrect way to define the index within *big* Split?

These Children are not always present (because when we cut 2nd child we do not now how much more to expect).
I believe the only way to do this is to accept an explicit parameter in Split

These `Children` are not always present (because when we cut 2nd child we do not now how much more to expect). I believe the only way to do this is to accept an explicit parameter in `Split`

Maybe even another public function for this which reuses most of the code, so that we have a simple interface for small objects.

Maybe even another public function for this which reuses most of the code, so that we have a simple interface for small objects.

Maybe even another public function for this which reuses most of the code, so that we have a simple interface for small objects.

Maybe even another public function for this which reuses most of the code, so that we have a simple interface for small objects.
aarifullin force-pushed feat/ecHeader_parentSplit from 3c78222892 to 8ccb0451be 2024-05-15 08:22:14 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from 8ccb0451be to a4e80d3f6c 2024-05-15 08:32:48 +00:00 Compare
acid-ant reviewed 2024-05-15 12:52:46 +00:00
@ -0,0 +4,4 @@
"context"
"fmt"
apemanager_v2 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/apemanager"
Collaborator

In other places we are following LowerCamelCase convention.

In other places we are following LowerCamelCase convention.
Poster
Collaborator

This commit with these changes has been picked accidentally :) I've removed it

This commit with these changes has been picked accidentally :) I've removed it
aarifullin changed title from object: Introduce new fields for `ECHeader` type to WIP: object: Introduce new fields for `ECHeader` type 2024-05-16 09:07:11 +00:00
aarifullin force-pushed feat/ecHeader_parentSplit from a4e80d3f6c to 3d9313b323 2024-05-16 09:26:17 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from 3d9313b323 to 729641b285 2024-05-16 09:30:57 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from 729641b285 to 340c72526d 2024-05-16 11:41:06 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from 340c72526d to ee00a4da10 2024-05-16 11:46:57 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from ee00a4da10 to facf1f2a1e 2024-05-16 11:52:32 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from facf1f2a1e to ea4585bea8 2024-05-16 12:17:40 +00:00 Compare
aarifullin force-pushed feat/ecHeader_parentSplit from ea4585bea8 to 3de256d05e 2024-05-17 12:18:14 +00:00 Compare
aarifullin changed title from WIP: object: Introduce new fields for `ECHeader` type to object: Introduce new fields for `ECHeader` type 2024-05-17 12:21:02 +00:00
fyrchik approved these changes 2024-05-17 13:18:05 +00:00
@ -0,0 +9,4 @@
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
session_v2 "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/session"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/signature"
apemanager_sdk "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/apemanager"

I believe sdk packages can use default names.

I believe sdk packages can use default names.
fyrchik marked this conversation as resolved
@ -17,1 +13,3 @@
headerLength uint32
parent oid.ID
parentSplitID *SplitID
parentSplitIndexSet bool

There should not be such variable: we always treat missing numbers as 0 in API and 0 also makes sense for small objects -- which are like big ones, but with only 1 part.

There should not be such variable: we always treat missing numbers as 0 in API and 0 also makes sense for small objects -- which are like big ones, but with only 1 part.
fyrchik marked this conversation as resolved
achuprov approved these changes 2024-05-20 09:36:17 +00:00
fyrchik merged commit 3de256d05e into master 2024-05-20 09:53:37 +00:00
Sign in to join this conversation.
There is no content yet.