port: tree: Support removing old split system nodes #444

Merged
alexvanin merged 2 commits from alexvanin/frostfs-s3-gw:port/settings-split into master 2024-07-26 06:54:10 +00:00
Owner

It's need to fit user expectation on deleting CORS for example. Previously after removing cors (that was uploaded in split manner) we can still get some data (from other node) because deletion worked only for latest node version.

Port of #437 into master

It's need to fit user expectation on deleting CORS for example. Previously after removing cors (that was uploaded in split manner) we can still get some data (from other node) because deletion worked only for latest node version. Port of #437 into master
alexvanin self-assigned this 2024-07-24 13:21:35 +00:00
alexvanin added 1 commit 2024-07-24 13:21:38 +00:00
[#437] tree: Support removing old split system nodes
Some checks failed
/ Builds (1.21) (pull_request) Successful in 1m30s
/ Builds (1.22) (pull_request) Successful in 1m37s
/ Lint (pull_request) Failing after 1m17s
/ Tests (1.21) (pull_request) Successful in 1m44s
/ Tests (1.22) (pull_request) Successful in 1m42s
/ Vulncheck (pull_request) Successful in 2m8s
/ DCO (pull_request) Successful in 5m52s
c81f3df9e3
It's need to fit user expectation on deleting CORs for example.
Previously after removing cors (that was uploaded in split manner)
we can still get some data (from other node)
because deletion worked only for latest node version.

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
alexvanin requested review from dkirillov 2024-07-24 13:22:00 +00:00
alexvanin requested review from mbiryukova 2024-07-24 13:22:02 +00:00
alexvanin reviewed 2024-07-24 13:23:06 +00:00
@ -118,2 +113,2 @@
if err = n.objectDeleteWithAuth(ctx, corsBkt, obj.Object(), prmAuth); err != nil {
return fmt.Errorf("delete cors object: %w", err)
for _, addr := range objs {
n.deleteCORSObject(ctx, bktInfo, addr)
Author
Owner

@mbiryukova is this change legal? We've used deleteCORSObject in PutBucketCORS so I've decided to reuse it in DeleteBucketCORS. Can I do that?

@mbiryukova is this change legal? We've used `deleteCORSObject` in `PutBucketCORS` so I've decided to reuse it in `DeleteBucketCORS`. Can I do that?
Member

The only difference is that error was returned. With multiple deletions I guess it's ok to just log them

The only difference is that error was returned. With multiple deletions I guess it's ok to just log them
alexvanin marked this conversation as resolved
alexvanin force-pushed port/settings-split from c81f3df9e3 to 5baa6c045d 2024-07-24 13:23:53 +00:00 Compare
alexvanin force-pushed port/settings-split from 5baa6c045d to 41eda7aa35 2024-07-24 13:32:11 +00:00 Compare
dkirillov reviewed 2024-07-24 13:42:24 +00:00
@ -510,3 +566,4 @@
return objToDelete, nil
}
func getCORSAddress(node *treeNode) (oid.Address, error) {
Member

Let's rename this function to getTreeNodeAddress for example

Let's rename this function to `getTreeNodeAddress` for example
dkirillov approved these changes 2024-07-24 13:43:28 +00:00
mbiryukova approved these changes 2024-07-24 14:01:57 +00:00
alexvanin added 1 commit 2024-07-25 13:06:45 +00:00
[#437] Rename getCORSAddress
All checks were successful
/ DCO (pull_request) Successful in 1m11s
/ Vulncheck (pull_request) Successful in 1m13s
/ Builds (1.21) (pull_request) Successful in 1m26s
/ Builds (1.22) (pull_request) Successful in 1m27s
/ Lint (pull_request) Successful in 2m16s
/ Tests (1.21) (pull_request) Successful in 1m34s
/ Tests (1.22) (pull_request) Successful in 1m24s
002dc2e658
This function is going to be reused
for lifecycles as well.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
dkirillov approved these changes 2024-07-25 14:45:47 +00:00
alexvanin merged commit c34680d157 into master 2024-07-26 06:54:10 +00:00
alexvanin deleted branch port/settings-split 2024-07-26 06:54:12 +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-s3-gw#444
No description provided.