Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15282315
D10669.id35200.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10669.id35200.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -26,6 +26,7 @@
'AphrontDeadlockQueryException' => 'aphront/storage/exception/AphrontDeadlockQueryException.php',
'AphrontDuplicateKeyQueryException' => 'aphront/storage/exception/AphrontDuplicateKeyQueryException.php',
'AphrontIsolatedDatabaseConnection' => 'aphront/storage/connection/AphrontIsolatedDatabaseConnection.php',
+ 'AphrontLockTimeoutQueryException' => 'aphront/storage/exception/AphrontLockTimeoutQueryException.php',
'AphrontMySQLDatabaseConnection' => 'aphront/storage/connection/mysql/AphrontMySQLDatabaseConnection.php',
'AphrontMySQLiDatabaseConnection' => 'aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php',
'AphrontNotSupportedQueryException' => 'aphront/storage/exception/AphrontNotSupportedQueryException.php',
@@ -532,6 +533,7 @@
'AphrontDeadlockQueryException' => 'AphrontRecoverableQueryException',
'AphrontDuplicateKeyQueryException' => 'AphrontQueryException',
'AphrontIsolatedDatabaseConnection' => 'AphrontDatabaseConnection',
+ 'AphrontLockTimeoutQueryException' => 'AphrontRecoverableQueryException',
'AphrontMySQLDatabaseConnection' => 'AphrontBaseMySQLDatabaseConnection',
'AphrontMySQLiDatabaseConnection' => 'AphrontBaseMySQLDatabaseConnection',
'AphrontNotSupportedQueryException' => 'AphrontQueryException',
diff --git a/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php b/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
--- a/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
+++ b/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php
@@ -289,8 +289,9 @@
'max_allowed_packet');
throw new AphrontConnectionLostQueryException("{$exmsg}\n\n{$more}");
case 1213: // Deadlock
- case 1205: // Lock wait timeout exceeded
throw new AphrontDeadlockQueryException($exmsg);
+ case 1205: // Lock wait timeout exceeded
+ throw new AphrontLockTimeoutQueryException($exmsg);
case 1062: // Duplicate Key
// NOTE: In some versions of MySQL we get a key name back here, but
// older versions just give us a key index ("key 2") so it's not
diff --git a/src/aphront/storage/exception/AphrontLockTimeoutQueryException.php b/src/aphront/storage/exception/AphrontLockTimeoutQueryException.php
new file mode 100644
--- /dev/null
+++ b/src/aphront/storage/exception/AphrontLockTimeoutQueryException.php
@@ -0,0 +1,4 @@
+<?php
+
+final class AphrontLockTimeoutQueryException
+ extends AphrontRecoverableQueryException {}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 4, 11:43 PM (8 h, 39 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7220878
Default Alt Text
D10669.id35200.diff (2 KB)
Attached To
Mode
D10669: Differentiate timeouts from deadlocks
Attached
Detach File
Event Timeline
Log In to Comment