nextcloud/tests
Christoph Wurst 7dd7256cfe
Prevent duplicate auth token activity updates
The auth token activity logic works as follows
* Read auth token
* Compare last activity time stamp to current time
* Update auth token activity if it's older than x seconds

This works fine in isolation but with concurrency that means that
occasionally the same token is read simultaneously by two processes and
both of these processes will trigger an update of the same row.
Affectively the second update doesn't add much value. It might set the
time stamp to the exact same time stamp or one a few seconds later. But
the last activity is no precise science, we don't need this accuracy.

This patch changes the UPDATE query to include the expected value in a
comparison with the current data. This results in an affected row when
the data in the DB still has an old time stamp, but won't affect a row
if the time stamp is (nearly) up to date.

This is a micro optimization and will possibly not show any significant
performance improvement. Yet in setups with a DB cluster it means that
the write node has to send fewer changes to the read nodes due to the
lower number of actual changes.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-22 09:32:22 +02:00
..
acceptance Profile backend 2021-10-19 04:59:35 +00:00
apps Validate the info.xml against the appstore schema file 2018-02-16 10:23:51 +01:00
Core Merge pull request #27733 from PhrozenByte/enhancement/noid/IURLGenerator-linkToDefaultPageUrl 2021-10-05 13:06:59 +02:00
data Fix integrity checker tests 2021-10-13 18:10:37 +02:00
docker Use strict 2021-04-26 12:45:12 +02:00
lib Prevent duplicate auth token activity updates 2021-10-22 09:32:22 +02:00
objectstore make object prefix configurable 2016-11-14 15:10:56 +01:00
Test/Repair/Owncloud Fix language codes test result order 2021-03-24 10:26:06 +01:00
travis Changed name of default logfile from owncloud.log to nextcloud.log. 2016-07-04 11:50:32 +02:00
apps.php Format control structures, classes, methods and function 2020-04-10 14:19:56 +02:00
bootstrap.php Use a blank line after the opening tag 2020-04-09 11:50:14 +02:00
drone-run-integration-tests.sh Also run for .sh and .json (when not package or package-lock) 2020-10-30 10:30:50 +01:00
drone-run-php-tests.sh Also run for .sh and .json (when not package or package-lock) 2020-10-30 10:30:50 +01:00
drone-wait-objectstore.sh Use minio for s3 tests 2021-07-01 08:22:24 +02:00
enable_all.php Add tests 2018-01-25 13:44:47 +01:00
jestBabelTransformer.js Rewrite requesttoken.spec.js with Jest 2021-05-30 10:44:34 +02:00
jestSetup.js Port dav calendar settings page to Vue.js 2021-06-05 11:22:25 +02:00
karma.config.js jsunit: Remove warnings during test runs 2020-12-29 08:42:34 +01:00
phpunit-autotest-external.xml Adjust the phpunit config 2016-05-25 15:14:37 +02:00
phpunit-autotest.xml Bring back forgotten tests 2021-03-24 09:07:54 +01:00
preseed-config.php Use minio for s3 tests 2021-07-01 08:22:24 +02:00
redis-cluster.config.php Fix drone 2017-07-14 15:04:18 +02:00
redis.config.php Fix drone 2017-07-14 15:04:18 +02:00
startsessionlistener.php Format control structures, classes, methods and function 2020-04-10 14:19:56 +02:00