-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mantaray removed entry still persists #4808
Comments
This issue seems to be related to the mantaray-js implementation so it may be better reported in that repository. |
@ldeffenb Not sure what you mean actually. I have not personally used |
There is no way that I know (knew) of to remove an individual manifest node using just the bee node APIs. From the description of what you did, I assumed (with all of the negative connotations of that word) that you were doing this external to the node with type/javascript using the mantaray-js package. Having looked at your test, it appears that you are using the bee node package for the manifest and coding your program in golang? I haven't heard of anyone trying to do this before, and therefore I'm not certain that directly accessing the packages that make up the bee node is supported. But I'm willing to be proved worng (sic)! https://github.com/ethersphere/bee/tree/master/pkg/manifest/mantaray But do be aware that any data that is uploaded to the swarm cannot be directly deleted. So even if you manage to remove the manifest node (and thereby get a new root manifest reference), the original data will still be accessible on the swarm via the original references, both of the data itself and/or the old root manifest reference and suitable path. |
Yes, I am doing this external to the node. But with golang, using the packages from bee itself.
As the packages can be imported and have the interfaces to be implemented, I can assure you it is possible. Not sure if it's officially supported, but on most of the few cases that i tried it worked. Like, adding file entries into an existing manifest, adding custom metadata to entries etc.
Yes I am aware of the fact that anything on swarm cannot be directly deleted and content will be accessible from both references. My idea is to update the manifest and access it from a feed. |
I was going through the mantaray-js repo. Saw this issue ethersphere/mantaray-js#40. I think it has the same issue as mine. |
Context
Bee Version: current master
System information: Mac M1
Summary
Adding and Persisting Nodes: Multiple nodes are added in the manifest, then saved.
Node Removal: Getting the saved node's reference from the previous step, a new manifest is loaded. Then one of the nodes is removed.
Persistence After Removal: The manifest is saved again after removing the node and reloaded to ensure the removed node does not reappear.
I have added a test that confirms that the removed node,
img/2.png
, cannot be found, verifying the removal operation. The expectation is for the system to return a mantaray.ErrNotFound error when trying to look up the removed node.Expected behavior
This persistence should be rectified in the code logic or the test setup.
Actual behavior
Despite removing
img/2.png
, the removed node still persists at the end.Steps to reproduce
mantaray
package I thinkmantaray_test
package ->persist_test.go
file.Please see the test : https://github.com/asabya/bee/blob/4a8c3c5d994a9d91e69e7680237274667efb0ebf/pkg/manifest/mantaray/persist_test.go#L66
Possible solution
The text was updated successfully, but these errors were encountered: