bee icon indicating copy to clipboard operation
bee copied to clipboard

Mantaray removed entry still persists

Open asabya opened this issue 5 months ago • 5 comments

⚠️ Support requests in an issue-format will be closed immediately. For support, go to Swarm's Discord.

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

  • the problem involves mantaray package I think
  • I have added a test in the mantaray_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

asabya avatar Sep 10 '24 06:09 asabya