aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2025-02-17 11:31:12 +0100
committerGitHub <noreply@github.com>2025-02-17 11:31:12 +0100
commit5b507561d3b2d16a9748faf41e3bb5f98b42338f (patch)
tree65e65e26a55eed363e16fadeca539fdb42fe72ed
parent892c473b064af222570a0c7155d9603a229d7312 (diff)
parent3548bde384bbd112ffb9d2198856610cb7db12a5 (diff)
downloadnextcloud-server-5b507561d3b2d16a9748faf41e3bb5f98b42338f.tar.gz
nextcloud-server-5b507561d3b2d16a9748faf41e3bb5f98b42338f.zip
Merge pull request #50791 from nextcloud/perf/remove-filecache-index
chore(filecache): remove index fs_id_storage_size
-rw-r--r--core/Application.php6
-rw-r--r--core/Migrations/Version31000Date20250213102442.php37
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
4 files changed, 40 insertions, 5 deletions
diff --git a/core/Application.php b/core/Application.php
index 79021a46e81..cfd0f90ef24 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -87,11 +88,6 @@ class Application extends App {
);
$event->addMissingIndex(
'filecache',
- 'fs_id_storage_size',
- ['fileid', 'storage', 'size']
- );
- $event->addMissingIndex(
- 'filecache',
'fs_storage_path_prefix',
['storage', 'path'],
['lengths' => [null, 64]]
diff --git a/core/Migrations/Version31000Date20250213102442.php b/core/Migrations/Version31000Date20250213102442.php
new file mode 100644
index 00000000000..d267e867129
--- /dev/null
+++ b/core/Migrations/Version31000Date20250213102442.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+namespace OC\Core\Migrations;
+
+use Closure;
+use OCP\DB\ISchemaWrapper;
+use OCP\Migration\Attributes\DropIndex;
+use OCP\Migration\Attributes\IndexType;
+use OCP\Migration\IOutput;
+use OCP\Migration\SimpleMigrationStep;
+
+/**
+ * Drop index fs_id_storage_size
+ *
+ * Added in https://github.com/nextcloud/server/pull/29118
+ * Matching request changed in https://github.com/nextcloud/server/pull/50781
+ */
+#[DropIndex(table: 'filecache', type: IndexType::INDEX, description: 'remove index fs_id_storage_size (concurrent with PRIMARY KEY)')]
+class Version31000Date20250213102442 extends SimpleMigrationStep {
+ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
+ /** @var ISchemaWrapper $schema */
+ $schema = $schemaClosure();
+
+ $table = $schema->getTable('filecache');
+
+ // Index added in Version13000Date20170718121200
+ if ($table->hasIndex('fs_id_storage_size')) {
+ $table->dropIndex('fs_id_storage_size');
+ }
+
+ return $schema;
+ }
+}
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index cbadc2deb15..5c36d30554b 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -1437,6 +1437,7 @@ return array(
'OC\\Core\\Migrations\\Version30000Date20240906095113' => $baseDir . '/core/Migrations/Version30000Date20240906095113.php',
'OC\\Core\\Migrations\\Version31000Date20240101084401' => $baseDir . '/core/Migrations/Version31000Date20240101084401.php',
'OC\\Core\\Migrations\\Version31000Date20240814184402' => $baseDir . '/core/Migrations/Version31000Date20240814184402.php',
+ 'OC\\Core\\Migrations\\Version31000Date20250213102442' => $baseDir . '/core/Migrations/Version31000Date20250213102442.php',
'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php',
'OC\\Core\\ResponseDefinitions' => $baseDir . '/core/ResponseDefinitions.php',
'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 10086cabce0..d366d58472f 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -1486,6 +1486,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\Core\\Migrations\\Version30000Date20240906095113' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240906095113.php',
'OC\\Core\\Migrations\\Version31000Date20240101084401' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20240101084401.php',
'OC\\Core\\Migrations\\Version31000Date20240814184402' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20240814184402.php',
+ 'OC\\Core\\Migrations\\Version31000Date20250213102442' => __DIR__ . '/../../..' . '/core/Migrations/Version31000Date20250213102442.php',
'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php',
'OC\\Core\\ResponseDefinitions' => __DIR__ . '/../../..' . '/core/ResponseDefinitions.php',
'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',