nextcloud / nextcloud/server

`--dry-run` flag in `occ db:add-missing-indices` partly ignored

Open
#39,383 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop 27-feedback bug feature: database feature: occ papercut
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

occ db:add-missing-indices --dry-run

did not work, at least not for this operation:

~# occ db:add-missing-indices --dry-run
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Check indices of the oc_mounts table.
Check indices of the oc_systemtag_object_mapping table.
Adding systag_by_tagid index to the oc_systemtag_object_mapping table, this can take some time...
oc_systemtag_object_mapping table updated successfully.

Hope this helps

Originally posted by @ernolf in https://github.com/nextcloud/server/issues/39379#issuecomment-1634992671

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the occ db:add-missing-indices command implementation and reproduce the shown --dry-run invocation. Trace the index update path and verify that dry-run mode leaves the database unchanged while still reporting the checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.