Morris Jobke
138219d74a
Run cleanup of expired DB file locks to background job
...
* fixes #22819
The old way fired a DELETE statement on each destruction of the
DBLockingProvider. Which could cause a lot of queries. It's enough
to run this every 5 minutes in a background job, which in the end
could result in file locks that exists 5 minutes longer - in the
worst case and for not properly released locks.
This makes the DB based locking a lot more performant and could
result in a similar performance to the Redis based locking provider.
2016-03-04 15:52:23 +01:00
Thomas Müller
682821c71e
Happy new year!
2016-01-12 15:02:18 +01:00
Thomas Müller
df15d54db6
Merge pull request #21072 from owncloud/db-lock-ttl
...
Remove all locks after ttl from the db
2015-12-10 13:51:18 +01:00
Robin Appelman
e191953942
Remove all locks after ttl from the db
2015-12-09 14:53:24 +01:00
Robin Appelman
693a3c353e
ttl for memcache locking backends that support it
2015-12-09 14:41:15 +01:00
Lukas Reschke
8f09d5b67c
Update license headers
2015-10-26 14:04:01 +01:00
Robin Appelman
f39c73c79c
add phpdoc
2015-10-21 09:43:30 +02:00
Robin Appelman
cc7bd53d17
Keep shared locks until the end of the request so we can reuse them
2015-10-21 09:43:30 +02:00
Björn Schießle
168c2055ba
catch all exception if table doesn't exists
2015-10-20 11:34:08 +02:00
Joas Schilling
336a127426
Catch "missing table" exception when cleaning up locks
2015-10-08 11:37:51 +02:00
Morris Jobke
b945d71384
update licence headers via script
2015-10-05 21:15:52 +02:00
Robin Appelman
b2a528e303
remove warning when trying to get a lock while in transaction
2015-09-25 14:16:50 +02:00
Individual IT Services
5f11049852
reduce amount of db calls needed for file-locks
...
return result of insertIfNotExist()
reducing initLockField, throwing exeption in releaseLock
don't throw exception in releaseLock()
cleaning up whitespaces
2015-09-22 15:04:15 +02:00
Robin Appelman
e9b1aa6037
improve doc
2015-09-17 14:09:28 +02:00
Robin Appelman
05fddec022
expire old lock rows
2015-09-17 13:55:04 +02:00
Robin Appelman
7c66328381
Remove the need for the transaction in the database locking backend
2015-09-17 11:07:59 +02:00
Thomas Müller
6f6a5f6c29
Adding path to log message
2015-08-25 14:31:21 +02:00
Robin Appelman
d979e54030
log a warning while trying to acquire a db lock from within a transaction
2015-08-10 14:39:34 +02:00
Robin Appelman
06065189d7
cleanup empty locks
2015-08-10 14:15:29 +02:00
Robin Appelman
9729e67e3d
more phpdoc
2015-08-03 16:02:24 +02:00
Robin Appelman
cd205249e4
more phpdoc
2015-08-03 15:46:23 +02:00
Robin Appelman
132a564a21
rename path field to key
2015-08-03 15:46:19 +02:00
Robin Appelman
c39ded21d2
initialize unused (for now) ttl field to 0
2015-08-03 14:13:36 +02:00
Robin Appelman
96a9d171b3
Fix db schema
2015-08-03 14:13:36 +02:00
Robin Appelman
4ea7cbb0f5
Add database backend for high level locking
2015-08-03 14:13:35 +02:00
Robin Appelman
a8552a1b24
split off keeping track of acquire locks
2015-08-03 14:12:56 +02:00
Morris Jobke
f63915d0c8
update license headers and authors
2015-06-25 14:13:49 +02:00
Robin Appelman
520a741876
clear memcache keys in locking
2015-06-12 17:28:09 +02:00
Thomas Müller
2104c2ffdd
Fixing undefined index 'foo'
2015-06-01 14:10:00 +02:00
Robin Appelman
8902e2be73
fix nooplockingprovider
2015-06-01 13:25:27 +02:00
Robin Appelman
ce04cf6610
shared lock around hooks
2015-06-01 13:24:02 +02:00
Robin Appelman
a1372b2fb5
add method to atomically change between shared and exclusive lock
2015-06-01 13:24:02 +02:00
Vincent Petry
2f4f468399
Added config switch for file locking
2015-06-01 13:22:56 +02:00
Robin Appelman
006eaa84aa
dont release shared lock if we dont have any
2015-06-01 13:22:56 +02:00
Robin Appelman
e08423f956
release all locks on shutdown
2015-06-01 13:22:56 +02:00
Robin Appelman
ba7d221cff
allow getting the path from the lockedexception
2015-04-30 14:48:42 +02:00
Robin Appelman
96f9573a4b
add memcache based shared/exclusive locking
2015-04-30 14:48:39 +02:00