Skip to content

log errors when a personal space is deleted - #3710

Merged
micbar merged 1 commit into
mainfrom
fix-delete-user
Oct 26, 2026
Merged

micbar merged 1 commit into
mainfrom
fix-delete-user

Conversation

@micbar

@micbar micbar commented Oct 13, 2026

Copy link
Copy Markdown
Member

Description

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added

@codacy-production

codacy-production Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity

Metric Results
Complexity 4

View in Codacy

🟢 Coverage 66.67% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 66.67% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (cd6afff) 92630 25424 27.45%
Head commit (01a6365) 92640 (+10) 25432 (+8) 27.45% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3710) 12 8 66.67%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@micbar

micbar commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

CI is red because of the posix driver, not because of the status check here.

The purge of the personal space fails with unlinkat …/users/<id>: directory not empty. Concurrent readers (search indexing after the trash event) take a metadata lock while os.RemoveAll runs, and HybridBackend.Lock recreates .oc-nodes/locks/<id>.mlock inside the space.

Before this PR graph ignored the status: the user was deleted and the space directory leaked. Now the user is kept, and every following scenario fails with nameAlreadyExists.

The fix belongs in the storage driver: rename the space root to a tombstone before removing it, so Lock can't recreate anything. This PR stays on hold until the reva fix and its bump are in.

@micbar

micbar commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

@aduffeck
Should we fix that in the posix driver by

  1. Moving away the personal space before deleting it?
  2. or by retrying os.RemoveAll()?

@micbar

micbar commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

See opencloud-eu/reva#876

@micbar

micbar commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

This needs a reva bump. I will rebase after that.

@micbar

micbar commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

rebased.

@micbar
micbar merged commit 4c6d7e7 into main Oct 26, 2026
61 checks passed
@micbar
micbar deleted the fix-delete-user branch October 26, 2026 16:20
@openclouders openclouders mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants