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.
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