fix(libsync): add NEXTCLOUD_BULK_UPLOAD env override to force-disable bulk upload#10300
fix(libsync): add NEXTCLOUD_BULK_UPLOAD env override to force-disable bulk upload#10300mosandlt wants to merge 2 commits into
Conversation
72ea360 to
a061b60
Compare
|
@mosandlt gentle reminder |
Per review feedback from @mgallien on PR nextcloud#10300 - new env vars should use the NEXTCLOUD_ prefix, not the legacy OWNCLOUD_ one (kept only for the pre-existing OWNCLOUD_CHUNKING_NG override). Signed-off-by: mosandlt <10558666+mosandlt@users.noreply.github.com> Assisted-by: ClaudeCode:claude-sonnet-5
|
Renamed to |
…bulk upload Mirrors the existing OWNCLOUD_CHUNKING_NG override pattern in the same file. Bulk upload (POST .../dav/bulk) is enabled automatically whenever the server advertises the dav.bulkupload capability, with no client-side way to opt out if that endpoint is broken or blocked somewhere in the network path (reverse proxy, WAF, etc). Observed against a self-hosted Nextcloud instance where every single bulk-upload POST failed immediately with UnknownNetworkError, while regular per-file uploads succeeded without issue. Because the failure is deterministic and the client re-attempts bulk upload from scratch on every sync invocation (the in-memory per-file blacklist does not survive across the max-sync-retries restarts, let alone separate nextcloudcmd invocations), affected files never converge and the sync stays permanently red for that server. Setting OWNCLOUD_BULK_UPLOAD=0 lets an operator route around a broken bulk endpoint without needing a custom build, matching the escape hatch already available for chunking via OWNCLOUD_CHUNKING_NG. Signed-off-by: mosandlt <10558666+mosandlt@users.noreply.github.com>
Per review feedback from @mgallien on PR nextcloud#10300 - new env vars should use the NEXTCLOUD_ prefix, not the legacy OWNCLOUD_ one (kept only for the pre-existing OWNCLOUD_CHUNKING_NG override). Signed-off-by: mosandlt <10558666+mosandlt@users.noreply.github.com> Assisted-by: ClaudeCode:claude-sonnet-5
24f1788 to
baf6cbc
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-10300.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Adds an
OWNCLOUD_BULK_UPLOADenvironment variable override toCapabilities::bulkUpload(), mirroring the existingOWNCLOUD_CHUNKING_NGpattern in the same file (src/libsync/capabilities.cpp).Problem
Bulk upload (
POST .../dav/bulk) is enabled automatically whenever the server advertises thedav.bulkuploadcapability, with no client-side way to opt out if that endpoint is broken or blocked somewhere in the network path (reverse proxy, WAF, CDN, etc).Observed against a self-hosted Nextcloud instance where every single bulk-upload POST failed immediately with
UnknownNetworkError, while regular per-file uploads (PropagateUploadFileNG) succeeded without issue. Because the failure is deterministic and the in-memory per-file bulk-upload blacklist does not survive across the--max-sync-retriesinternal restarts (let alone separatenextcloudcmdinvocations from a cron/systemd timer), affected files never converge — the sync stays permanently red for every file it decides to bulk-upload, run after run, with no recovery path short of patching the client.Fix
OWNCLOUD_BULK_UPLOAD=0forces bulk upload off regardless of server capabilities (falls back to the normal single-file upload path).OWNCLOUD_BULK_UPLOAD=1forces it on. Unset preserves current behavior exactly (server capability decides).Verified locally: rebuilding
nextcloudcmd/libnextcloudsyncwith this change and settingOWNCLOUD_BULK_UPLOAD=0took a sync from a reproducible ~630-file failure batch (100% of that sync's bulk-upload attempts failing withUnknownNetworkError, identical set of files failing across 3 consecutive runs) down to a clean run with zero bulk-related errors, using the regular upload path instead.Testing
dpkg-buildpackagebuild against Debian 12 (bookworm) package3.7.3-1+deb12u2OWNCLOUD_BULK_UPLOAD=0/=1/ unset all behave as expected against a real serverCapabilities::bulkUpload(); behavior for the unset case is unchanged (same expression as before, now reached only after the two new early-return checks)