Repository navigation
feat(database): drop the checks that do not earn their place - #1128
Merged
Merged
Conversation
Twenty of the fifty-seven ported checks are removed, leaving thirty-seven. Nextcloud already reports missing indices, columns and primary keys on Settings > Overview, so repeating them here only gave an admin two places to read the same finding, and the transaction isolation check went with them. The query cache and MyISAM groups describe engines and features that a current Nextcloud does not use — the query cache was removed outright in MySQL 8.0 — so on a supported server they either skip or advise tuning something nothing touches. The rest are checks whose finding is not actionable: how long the server has been up, whether it has served enough queries to be worth analysing, slow_launch_time, skip_name_resolve, and the two binary-log ones that only matter with replication configured. Removing the schema-integrity rules pays for itself twice over. They were the only consumers of the code that dispatches AddMissingIndicesEvent and friends to every installed app and diffs the result against the live schema through SchemaWrapper, so that work no longer runs on a page load, and the app no longer reaches into OC\DB\SchemaWrapper -- one fewer private server class for a bundled app to depend on. The psalm baseline shrinks with it. It also removes the rule behind the MariaDB log noise fixed in the previous commit, so that fix now has nothing left to suppress on MariaDB. On a MariaDB test instance the page goes from 57 checks with 12 failing to 37 with 5, and the categories MyISAM, QueryCache, Security and Server disappear entirely. Signed-off-by: Frank Karlitschek <frank.karlitschek@nextcloud.com> Assisted-by: Claude Code:claude-opus-5 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
/backport to stable35 |
|
The backport to # Switch to the target branch and update it
git checkout stable35
git pull origin stable35
# Create the new backport branch
git checkout -b backport/1128/stable35
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick f81760f9
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/1128/stable35Error: Failed to check for changes with origin/stable35: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes 20 of the 57 ported checks, leaving 37.
What went, and why
Result on a MariaDB instance: 57 checks with 12 failing → 37 with 5, and the
MyISAM,QueryCache,SecurityandServercategories disappear entirely. The two Nextcloud rules worth keeping — utf8mb4 charset and InnoDB engine — stay.It pays for itself twice over
The three schema-integrity rules were the only consumers of
NextcloudSchema::missingSchemaCounts(), which dispatchesAddMissingIndicesEvent,AddMissingColumnsEventandAddMissingPrimaryKeyEventto every installed app and diffs the declared expectations against the live schema throughSchemaWrapper. That is easily the most expensive thing a check run did, and it no longer runs at all.It also drops
OC\DB\SchemaWrapper— one fewer private server class a bundled app depends on, which is something I flagged as a maintenance risk in the app's review. The psalm baseline shrinks from 79 entries to 68 along with it.And it removes
Concurrent_insert_off, the rule behind the MariaDB log noise fixed in #1125 — so that fix now has nothing left to suppress on MariaDB, though it remains correct for other rule/flavour mismatches.Verification
Against a live MariaDB instance:
nc.innodb_engineandnc.utf8mb4_charsetphp-cs-fixerand psalm clean; committedjs/cssreproduce from a fresh build.One to confirm
You listed slow_launch_time, which I read as the rule named "slow_launch_time threshold high" (
Slow_launch_time_high). There is a sibling, "Threads slow to launch" (Slow_launch_threads), which reports threads actually exceeding that threshold rather than the threshold's value. I left it, since removing more than was asked is harder to notice than removing less — say the word if it should go too.