Skip to content

Conversation

@st3iny
Copy link
Member

@st3iny st3iny commented May 2, 2025

Summary

It is not required to run the orphan cleanup synchronously during upgrades. I moved it to an async background job to be run some time after the repair jobs ran.

  1. Move cleaning up orphaned CalDAV and CardDAV children to an async background job.
  2. Chunk it to batches of 1000 to mitigate excessive RAM usage on large instances.

Checklist

@st3iny st3iny added bug 3. to review Waiting for reviews feature: dav performance 🚀 feature: caldav Related to CalDAV internals feature: carddav Related to CardDAV internals labels May 2, 2025
@st3iny st3iny added this to the Nextcloud 32 milestone May 2, 2025
@st3iny st3iny requested a review from a team as a code owner May 2, 2025 12:29
@st3iny st3iny requested review from ArtificialOwl, come-nc and icewind1991 and removed request for a team May 2, 2025 12:29
@github-project-automation github-project-automation bot moved this to 🏗️ In progress in 💌 📅 👥 Groupware team May 2, 2025
@st3iny
Copy link
Member Author

st3iny commented May 2, 2025

/backport to stable30

@st3iny
Copy link
Member Author

st3iny commented May 2, 2025

/backport to stable31

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
@st3iny st3iny force-pushed the fix/dav/orphan-cleanup-job branch from e9b96c9 to d0fcb7e Compare May 5, 2025 10:13
@st3iny
Copy link
Member Author

st3iny commented May 5, 2025

I rebased and squashed. Nothing else changed.

@st3iny st3iny enabled auto-merge May 5, 2025 10:13
@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 5, 2025
@st3iny st3iny merged commit 4783459 into master May 5, 2025
192 checks passed
@st3iny st3iny deleted the fix/dav/orphan-cleanup-job branch May 5, 2025 10:32
@backportbot
Copy link

backportbot bot commented May 5, 2025

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/52589/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick d0fcb7e6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/52589/stable31

Error: Failed to clone repository: Failed to clone and cache repo: Error: spawn ENOTCONN


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link

backportbot bot commented May 5, 2025

The backport to stable30 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30

# Create the new backport branch
git checkout -b backport/52589/stable30

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick d0fcb7e6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/52589/stable30

Error: Failed to clone repository: Failed to clone and cache repo: Error: spawn ENOTCONN


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@st3iny
Copy link
Member Author

st3iny commented May 5, 2025

/backport to stable30

@backportbot
Copy link

backportbot bot commented May 5, 2025

The backport to stable30 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30

# Create the new backport branch
git checkout -b backport/52589/stable30

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick d0fcb7e6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/52589/stable30

Error: Failed to clone repository: Failed to clone and cache repo: Error: spawn ENOTCONN


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@st3iny
Copy link
Member Author

st3iny commented May 6, 2025

/backport to stable31

@st3iny
Copy link
Member Author

st3iny commented May 6, 2025

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: caldav Related to CalDAV internals feature: carddav Related to CardDAV internals feature: dav performance 🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Upgrade 30.0.10 to 31.04 (dav) requires 6GB of RAM on single-user instance

5 participants