Skip to content
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

NSFS | Fix delete last object deletes directory object if its size is 0 #8808

Merged

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Feb 18, 2025

Explain the changes

  1. Added stat inside the _delete_path_dirs in order to check before we delete the directory if any dir in the hierarchy is a directory object and if yes - break the loop.

Issues: Fixed #xxx / Gap #xxx

  1. Fixed NSFS | Delete last object in a directory that is also a directory object deletes the directory if the object directory size is 0 (no internal .folder optimization) #8805

Testing Instructions:

  1. sudo node node_modules/mocha/bin/mocha src/test/unit_tests/test_namespace_fs -g "delete inner object in directory object size 0 - no .folder file"
  • Doc added/updated
  • Tests added

@romayalon romayalon force-pushed the romy-delete-last-object-dir-obj-size-0 branch from 60c4dde to e4628ce Compare February 18, 2025 16:26
@romayalon romayalon requested a review from nadavMiz March 4, 2025 14:23
@romayalon romayalon force-pushed the romy-delete-last-object-dir-obj-size-0 branch from b319286 to f6a2b5f Compare March 4, 2025 14:24
@romayalon romayalon requested a review from nadavMiz March 4, 2025 17:53
Copy link
Contributor

@nadavMiz nadavMiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romayalon romayalon force-pushed the romy-delete-last-object-dir-obj-size-0 branch from a12fd35 to 79ed147 Compare March 5, 2025 12:19
@romayalon romayalon merged commit 1284792 into noobaa:master Mar 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants