[#574] Check if the container has been really removed from neo-go #624

Merged
fyrchik merged 1 commit from aarifullin/frostfs-node:fix/574-tree_del_info into master 2024-09-04 19:51:02 +00:00
Member
  • Add DeletionInfo method support for morph client
  • Use this morph client method in tree service to check if the container has been really removed
* Add DeletionInfo method support for morph client * Use this morph client method in tree service to check if the container has been really removed
aarifullin added the
bug
frostfs-node
labels 2023-08-18 14:23:55 +00:00
aarifullin reviewed 2023-08-18 14:27:26 +00:00
@ -455,1 +467,3 @@
removed = append(removed, cnr)
existed, err := s.containerEverExisted(cnr)
if err != nil {
Author
Member

@fyrchik
I am not sure that this can be incorrectly ignored (the container cannot be appended to removed list and thus sync will try to sync the container?). Anyway, the netmap cannot be updated until we cannot get info about the container

@fyrchik I am not sure that this can be incorrectly ignored (the container cannot be appended to `removed` list and thus sync will try to sync the container?). Anyway, the netmap cannot be updated until we cannot get info about the container
Owner

How is netmap update connected to all this?
It is right, not to remove container in case "unknown" error happens.

How is netmap update connected to all this? It is right, not to remove container in case "unknown" error happens.
Author
Member

How is netmap update connected to all this?

Sorry, nevermind

newMap, cnrsToSync := s.containersToSync(cnrs)

s.syncContainers(ctx, cnrsToSync)

s.removeContainers(ctx, newMap)

I have mistaken newMap for netmap :)

> How is netmap update connected to all this? Sorry, nevermind ```golang newMap, cnrsToSync := s.containersToSync(cnrs) s.syncContainers(ctx, cnrsToSync) s.removeContainers(ctx, newMap) ``` I have mistaken `newMap` for `netmap` :)
aarifullin reviewed 2023-08-18 14:27:29 +00:00
aarifullin reviewed 2023-08-18 14:27:31 +00:00
aarifullin requested review from storage-core-committers 2023-08-18 14:28:03 +00:00
aarifullin requested review from storage-core-developers 2023-08-18 14:28:09 +00:00
aarifullin force-pushed fix/574-tree_del_info from bf5f39dc9a to 27fbce90f7 2023-08-21 07:42:37 +00:00 Compare
aarifullin force-pushed fix/574-tree_del_info from 27fbce90f7 to de6245414f 2023-08-21 07:49:40 +00:00 Compare
aarifullin changed title from Check if the container has been really removed from neo-go to [#574] Check if the container has been really removed from neo-go 2023-08-21 07:51:59 +00:00
dstepanov-yadro approved these changes 2023-08-21 08:00:21 +00:00
fyrchik approved these changes 2023-08-21 08:38:40 +00:00
@ -16,1 +16,4 @@
container.Source
// DeletionInfo returns deletion info for the given container in the
// FrostFS network at the moment of a call.
Owner

at the moment of a call is somewhat obvious (and, probably, doesn't say what you wanted to). How about to get rid of it?

`at the moment of a call` is somewhat obvious (and, probably, doesn't say what you wanted to). How about to get rid of it?
Author
Member

This was comment for a comment :) Removed

This was comment for a comment :) Removed
fyrchik marked this conversation as resolved
aarifullin force-pushed fix/574-tree_del_info from de6245414f to 14511cae0e 2023-08-21 08:40:51 +00:00 Compare
fyrchik reviewed 2023-08-21 08:41:07 +00:00
@ -443,0 +446,4 @@
if err == nil {
return true, nil
}
if errors.Is(err, &apistatus.ContainerNotFound{}) {
Owner

I am not sure Is will work now as expected (compared to As), do we use Is anywhere for status errors?

I am not sure `Is` will work now as expected (compared to `As`), do we use `Is` anywhere for status errors?
fyrchik marked this conversation as resolved
fyrchik reviewed 2023-08-21 08:41:10 +00:00
@ -443,0 +446,4 @@
if err == nil {
return true, nil
}
if errors.Is(err, &apistatus.ContainerNotFound{}) {
Owner

I am not sure Is will work now as expected (compared to As), do we use Is anywhere for status errors?

I am not sure `Is` will work now as expected (compared to `As`), do we use `Is` anywhere for status errors?
Author
Member

Sorry, some ideas "mixed" up in my mind.
Fixed to errors.As

Sorry, some [ideas](https://github.com/nspcc-dev/neofs-node/issues/2465#issuecomment-1661642640) "mixed" up in my mind. Fixed to `errors.As`
fyrchik marked this conversation as resolved
aarifullin force-pushed fix/574-tree_del_info from 14511cae0e to ff04a1f5ad 2023-08-21 08:56:44 +00:00 Compare
aarifullin force-pushed fix/574-tree_del_info from ff04a1f5ad to 23be3eb627 2023-08-21 09:50:49 +00:00 Compare
fyrchik approved these changes 2023-08-21 09:53:06 +00:00
aarifullin requested review from dstepanov-yadro 2023-08-21 13:29:22 +00:00
fyrchik merged commit 23be3eb627 into master 2023-08-21 14:03:36 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
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-node#624
No description provided.