nextcloud/lib/private/DB
Carl Schwan cbe4a26156
fix(propagator): Improve lock behavior of propagator
Fix possible dead locks when running the propagator caused by two
requests updating the same amount rows in transactions.

- Lock rows always in the same deterministic order by sorting the
  path_hash first

- On all database outside of sqlite, also do first a SELECT FOR UPDATE
  to lock all the rows used in batch UPDATE calls, afterward to decrease
  the risk of two requests trying to lock the same rows

Signed-off-by: Carl Schwan <carlschwan@kde.org>
(cherry picked from commit cae742d182)
2026-02-17 10:39:11 +01:00
..
Exceptions feat: log query for dbal exceptions 2025-02-26 17:37:13 +01:00
QueryBuilder fix(propagator): Improve lock behavior of propagator 2026-02-17 10:39:11 +01:00
Adapter.php fix: Revert "fix(db): Store last insert id before reconnect" 2025-05-21 07:55:42 +02:00
AdapterMySQL.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
AdapterOCI8.php fix: Revert "fix(db): Store last insert id before reconnect" 2025-05-21 07:55:42 +02:00
AdapterPgSql.php fix: Revert "fix(db): Store last insert id before reconnect" 2025-05-21 07:55:42 +02:00
AdapterSqlite.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
ArrayResult.php chore: Apply php:cs recommendations 2024-08-28 10:44:18 +02:00
BacktraceDebugStack.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Connection.php feat(database): Add option to test for mariadb 2025-08-08 07:50:51 +02:00
ConnectionAdapter.php feat(database): Add option to test for mariadb 2025-08-08 07:50:51 +02:00
ConnectionFactory.php feat(db): add SSL/TLS support for PostgreSQL 2025-09-22 14:55:29 +02:00
DbDataCollector.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
MigrationException.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MigrationService.php chore: Get rid of AppLocator helper 2025-08-18 17:09:40 +02:00
Migrator.php fix: Run migration sql as statement so that the primary db node is used 2024-08-30 15:45:50 +02:00
MigratorExecuteSqlEvent.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
MissingColumnInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MissingIndexInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MissingPrimaryKeyInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MySqlTools.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ObjectParameter.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
OCSqlitePlatform.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
OracleConnection.php fix: correctly quote tablenames for truncating with oracle 2026-02-11 16:58:35 +01:00
OracleMigrator.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
PgSqlTools.php fix(db): Use createSchemaManager() method as getSchemaManager() is deprecated 2024-07-19 11:21:11 +02:00
PreparedStatement.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
ResultAdapter.php fix(db): Fix internal calls to doctrine's fetch() methods 2024-07-19 11:21:12 +02:00
SchemaWrapper.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
SetTransactionIsolationLevel.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
SQLiteMigrator.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
SQLiteSessionInit.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00