Christoph Wurst
d52ebaa7cd
Merge pull request #43297 from nextcloud/fix/db/dirty-read-cool-off
...
fix(db): Let dirty writes cool off
2024-02-19 10:53:05 +07:00
Christoph Wurst
1f46e4b854
fix(db): Let dirty writes cool off
...
We can assume that after a few seconds a read will be clean again.
This is helpful for false warnings in long running processes.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-02-19 10:13:24 +07:00
Christoph Wurst
cf17a20835
fix(db): Give dirty read exception a message
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-02-15 09:14:47 +07:00
Christoph Wurst
aef28e191a
fix(db): Unify long transaction log/exception message
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-02-13 08:17:49 +07:00
Simon L
8fd2289058
Merge pull request #43357 from nextcloud/enh/41253/fix-occ-upgrade
...
fix(migration): Make naming constraint fail softer on updates
2024-02-08 18:27:39 +07:00
Louis Chemineau
898df41de9
Revert "Merge branch 'master' of github.com:nextcloud/server"
...
This reverts commit d9d60238c7 , reversing
changes made to ba3fdb0cdc .
2024-02-08 15:31:19 +07:00
Joas Schilling
487c33f479
fix(migration): Make naming constraint fail softer on updates
...
Only on installation we want to break hard, so that all developers notice
the bugs when installing the app on any database or CI, and can work on
fixing their migrations before releasing a version incompatible with Postgres.
In case of updates we might be running on production instances and the
administrators being faced with the error would not know how to resolve it
anyway. This can also happen with instances, that had the issue before the
current update, so we don't want to make their life more complicated
than needed.
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-02-07 20:45:51 +07:00
Christoph Wurst
97152de9bf
fix(db): Execute dirty reads on the primary node
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-30 12:17:39 +07:00
Christoph Wurst
911ab393c0
feat(db): Make dirty query logging available in production
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-30 10:31:03 +07:00
Christoph Wurst
033a654389
Merge pull request #42929 from nextcloud/fix/db/transacted-read-not-dirty
...
fix(db): Do not log transacted reads as dirty read
2024-01-23 09:34:20 +07:00
Christoph Wurst
ab0d7c007d
fix(db): Remove very verbose dirty query logs
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-18 18:33:07 +07:00
Christoph Wurst
f54b08c224
fix(db): Do not log transacted reads as dirty read
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-01-18 13:37:36 +07:00
Julius Härtl
296096e069
fix: Add reconnect check in case of timeouts on the db side
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-01-12 14:38:01 +07:00
Julius Härtl
c17c42a0b2
feat: First attempt to track dirty tables after writes and switch back to replicas if reads go to other tables
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
debug: error log
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-01-12 11:02:50 +07:00
Julius Härtl
3e60092b7d
feat: Add logging for transaction time
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-01-12 11:02:50 +07:00
Julius Härtl
86dc766276
Cast datetime columns in sqlite before comparing
...
Move the logic to prepare a column to the parent ExpressionBuilder so
that it can be reused for OCI and sqlite
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-29 10:36:59 +07:00
Julius Härtl
79c4986354
enh: Implement PrimaryReadReplicaConnection
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-16 20:27:37 +07:00
Côme Chilliet
1b547c7db8
Migrate missing primary key database check to new API
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-11-27 15:23:52 +07:00
Côme Chilliet
ad88c04f2d
Migrate missing index database check to new API
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-11-27 15:23:52 +07:00
Côme Chilliet
2cb1c0f2dc
Migrate missing column database check to new API
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-11-27 15:23:52 +07:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Arthur Schiwon
93505b2cdd
fix(workflowengine): use andWhere() not second where()
...
- an unconditional where() condition is added right before
- fixes also wrongly named methods in the Exception message
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-13 14:47:47 +07:00
Joas Schilling
6f39d82031
fix(install): Make installing more verbose
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-11-03 15:44:46 +07:00
Joas Schilling
15a7aa51c5
fix(dbal): Fix types in query builder methods for parameters
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-18 07:09:08 +07:00
Joas Schilling
570159e610
fix(DB): Update comment to state why we still use the max 4k limit
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:27 +07:00
Joas Schilling
ccb01b19a0
fix(sqlite): Remove some old SQLite cheats
...
- Doctrine correctly forces integer for autoincrement by now
- Doctrine correctly maintains integer types by now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:27 +07:00
Joas Schilling
f8ee6c4769
fix(oracle): Move away from internal and deprecated SchemaDiff API
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:26 +07:00
Joas Schilling
919207873e
fix(dbal): Move migrator away from deprecated calls
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:26 +07:00
Joas Schilling
160298c556
fix(mysql): Remove custom MySQL workaround from 2015
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:25 +07:00
Joas Schilling
b202b139dd
fix(postgres): Remove old Postgres 9.4 workaround
...
Postgres 10 is the minimum in the meantime
and doctrine/dbal fixed this in 2.6.0 already
ref https://github.com/doctrine/dbal/pull/2614
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:25 +07:00
Joas Schilling
ad839dbb0a
fix(sqlite): Remove no longer required autoincrement fix
...
- I installed current master and exported the schema as SQL
- Then I went to this branch, removed the content of the run() method (so made it no-op)
- I installed again and exported the schema as SQL
- The files are exactly the same, so whatever we tried to fix was fixed since 2015 in doctrine dbal
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-06 15:29:25 +07:00
Hamid Dehnavi
ea06cf2f39
Convert isset ternary to null coalescing operator
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Christoph Wurst
6b90ab1953
refactor: Use DBAL's executeQuery instead of query (deprecated)
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-09-27 10:43:42 +07:00
Robin Appelman
ef87ff1848
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
...
Refactor "substr" calls in lib/private to improve code readability
2023-09-21 16:34:27 +07:00
Anna Larch
56419d94f8
enh(db): provide database providers via API
...
To avoid leaking internals (OC), wrap the getDatabasePlatform and provide the
associated constants
fixes https://github.com/nextcloud/server/issues/30877
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-09-19 11:56:44 +07:00
Côme Chilliet
5c78adb20d
Fix Exception catching in OC\DB\Adapter
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-05 09:20:26 +07:00
Carl Schwan
e966cfbc4b
Cleanup plsam issues in DB/ContactsManager and Console
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-09-05 09:20:26 +07:00
Joas Schilling
0bf738d8cb
feat(db): Ensure that index names are unique across the database
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-20 14:27:26 +07:00
Hamid Dehnavi
d0b20534b9
Refactor "substr" calls to improve code readability
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07:00
Christoph Wurst
14719110b9
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
dartcafe
2211721c2b
fixed quotes
...
Signed-off-by: dartcafe <github@dartcafe.de>
2023-06-20 18:35:10 +07:00
dartcafe
ed294f6e43
add type #38909
...
Signed-off-by: dartcafe <github@dartcafe.de>
2023-06-20 18:35:10 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Julius Härtl
3bdd770129
fix: Check for wrapped retriable exceptions
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-02 19:42:11 +07:00
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Arthur Schiwon
997c2a2a79
fix DBAL exception handling in setValues
...
This seems to be a left over after abstracting DBAL. Nowadays,
IQueryBuilder::executeStatement() only throws a \OCP\DB\Exception, where
previously original DBAL exceptions where thrown. These are now wrapped,
the orignal classes are now mapped to a reason.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-03-31 17:01:17 +07:00
Ferdinand Thiessen
a9af58fd1a
fix(DB): Remove not supported column comments when using SQLite
...
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-02-22 01:07:26 +07:00
Robin Appelman
426b3429f7
log start time of queries for profiler
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-14 15:16:15 +07:00
Joas Schilling
ecad09b38a
Merge pull request #36261 from nextcloud/techdebt/noid/warn-devs-about-potential-bugs
...
fix(querybuilder): Log a warning if where() is called again on a quer…
2023-01-23 18:47:25 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00