1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-12 00:26:13 +01:00
phorge-phorge/src/storage/exception
epriestley c30cb7669e Simplify transaction handling and restore read/write locks
Summary:
  - We used to have connection-level caching, so we needed getTransactionKey() to make sure there was one transaction state per real connection. We now cache in Lisk and each Connection object is guaranteed to represent a real, unique connection, so we can make this a non-static.
  - I kept the classes separate because it was a little easier, but maybe we should merge them?
  - Also track/implement read/write locking.
  - (The advantage of this over just writing LOCK IN SHARE MODE is that you can use, e.g., some Query class even if you don't have access to the queries it runs.)

Test Plan: Can you come up with a way to write unit tests for this? It seems like testing that it works requires deadlocking MySQL if the test is running in one process.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2398
2012-05-05 11:29:09 -07:00
..
accessdenied Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
base Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
connection Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
connectionlost Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
count Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
deadlock Simplify transaction handling and restore read/write locks 2012-05-05 11:29:09 -07:00
duplicatekey Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
objectmissing Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
parameter Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
recoverable Add "final" to (almost) everything else 2012-03-13 16:21:04 -07:00
schema Make SQL patch management DAG-based and provide namespace support 2012-04-30 07:54:00 -07:00