Improve reindex command - #3213
Conversation
The command no longer times out after 10 minutes when the processing hasn't been finished yet. Instead it shows progress and logs successful and failed spaces. The process can also be aborted using ctrl+c. Example output: ``` $ bin/opencloud search index --all-spaces --insecure --force-rescan [1/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$eb6a8a0e-2e62-4b40-bce9-360063236676!eb6a8a0e-2e62-4b40-bce9-360063236676 in 5.501190908s [2/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$34b7c565-da3b-4f53-8559-825e87db4011!34b7c565-da3b-4f53-8559-825e87db4011 in 5.935075697s [3/602] indexed space a9033d65-6c13-4556-b923-f321ab33a9ca$e08c6026-24f6-4a9e-a805-ed335b34b8da!e08c6026-24f6-4a9e-a805-ed335b34b8da in 6.016350958s ^Caborted, indexing has been stopped ``` Fixes opencloud-eu#2592
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 0.00% diff coverage · -0.01% coverage variation
Metric Results Coverage variation ✅ -0.01% coverage variation (-1.00%) Diff coverage ✅ 0.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (7e8179a) 83772 19258 22.99% Head commit (2eb1fe0) 83764 (-8) 19244 (-14) 22.97% (-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 (#3213) 205 0 0.00% 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.
There was a problem hiding this comment.
LGTM
I would prefer the linked more generic solution for SilenceUsage and would - while at it - add the concurrency flag to the cli command, but you can disagree
More granular progress would be great (progress inside spaces), but I like the digestible size of the PR - could totally be a followup
It will be obsolete once opencloud-eu#3140 has been merged
It controls the number of spaces that are indexed in parallel. The max concurrency configured in the server is still considered.
#1812) ##### [\`7.4.0\`](https://github.com/opencloud-eu/opencloud/blob/HEAD/CHANGELOG.md#740---2026-08-03) ##### ❤️ Thanks to all contributors! ❤️ [@AlexAndBear](https://github.com/AlexAndBear), [@JammingBen](https://github.com/JammingBen), [@aduffeck](https://github.com/aduffeck), [@dschmidt](https://github.com/dschmidt), [@fschade](https://github.com/fschade), [@michaelstingl](https://github.com/michaelstingl), [@pbleser-oc](https://github.com/pbleser-oc), [@rhafer](https://github.com/rhafer), [@schweigisito](https://github.com/schweigisito), [@v-scharf](https://github.com/v-scharf) ##### 📈 Enhancement - Do not check ignored paths \[[#3233](opencloud-eu/opencloud#3233)] - Extend posixfs consistency check \[[#3220](opencloud-eu/opencloud#3220)] - Improve reindex command \[[#3213](opencloud-eu/opencloud#3213)] - Reindex spaces concurrently \[[#3207](opencloud-eu/opencloud#3207)] - feat: add announcement banner \[[#3189](opencloud-eu/opencloud#3189)] - feat: add space viewer with versions role \[[#2961](opencloud-eu/opencloud#2961)] ##### 🐛 Bug Fixes - fix(runtime): log service startup errors instead of printing them beside the log \[[#3140](opencloud-eu/opencloud#3140)] - fix(posixfs scan): Setup logger for scan command \[[#3185](opencloud-eu/opencloud#3185)] ##### ✅ Tests - api-test: mark group last-manager removal scenario as flaky \[[#3194](opencloud-eu/opencloud#3194)] - rerun flaky tests \[[#3183](opencloud-eu/opencloud#3183)] - api-test: fix removeAccessToDrive.feature:145 \[[#3179](opencloud-eu/opencloud#3179)] - api-test: cover additional unified roles in acceptance tests \[[#3169](opencloud-eu/opencloud#3169)] - test(apiAuthApp): fix flaky token pattern \[[#3163](opencloud-eu/opencloud#3163)] - test(apiArchiver): the single-resource archive is named after the resource \[[#3080](opencloud-eu/opencloud#3080)] - test(coreApiWebdavUploadTUS): assert etag and permissions on the finalizing TUS chunk \[[#3078](opencloud-eu/opencloud#3078)] - test(coreApiWebdavOperations): download a file with a literal "%" via its oc:downloadURL \[[#3079](opencloud-eu/opencloud#3079)] ##### 📚 Documentation - maint: clean-up auth-app documentation \[[#3155](opencloud-eu/opencloud#3155)] - ci: sync tests/README.md to docs \[[#3164](opencloud-eu/opencloud#3164)] ##### 📦️ Dependencies - \[full-ci] chore: bump web to v7.3.0 \[[#3223](opencloud-eu/opencloud#3223)] - build(deps): bump github.com/open-policy-agent/opa from 1.18.2 to 1.19.0 \[[#3231](opencloud-eu/opencloud#3231)] - build(deps): bump google.golang.org/grpc from 1.82.0 to 1.83.0 \[[#3232](opencloud-eu/opencloud#3232)] - chore(idp): bump dependencies \[[#3226](opencloud-eu/opencloud#3226)] - build(deps): bump github.com/nats-io/nats-server/v2 from 2.14.3 to 2.14.4 \[[#3221](opencloud-eu/opencloud#3221)] - build(deps): bump github.com/go-ldap/ldap/v3 from 3.4.13 to 3.4.14 \[[#3222](opencloud-eu/opencloud#3222)] - build(deps): bump github.com/prometheus/client\_golang from 1.23.2 to 1.24.1 \[[#3218](opencloud-eu/opencloud#3218)] - build(deps): bump github.com/gabriel-vasile/mimetype from 1.4.13 to 1.4.15 \[[#3217](opencloud-eu/opencloud#3217)] - build(deps): bump golang.org/x/net from 0.56.0 to 0.57.0 \[[#3136](opencloud-eu/opencloud#3136)] - build(deps): bump github.com/beevik/etree from 1.6.0 to 1.7.0 \[[#3134](opencloud-eu/opencloud#3134)] Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The command no longer times out after 10 minutes when the processing
hasn't been finished yet. Instead it shows progress and logs successful
and failed spaces. The process can also be aborted using ctrl+c.
Example output:
Fixes #2592