[
https://issues.apache.org/jira/browse/OLIO-45?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Akara Sucharitakul updated OLIO-45:
-----------------------------------
Component/s: php-app
Assignee: Akara Sucharitakul (was: Shanti Subramanyam)
1) We need to sort the tags for an added event. This way all the addEventResult
calls get the same tag record log sequence. This will resolve the deadlock
issue.
2) We also need to separate all file writes and geocoder accesses out of the
transaction boundaries. This will ensure that any delay in those components
won't cause the transaction to hold locks longer than necessary. Such lock
holding can result in a transaction timeout.
3) For addEventResult alone, the image name comes from the event id which is
generated by the insert in the transaction using auto increment fields. So we
need to copy the images after the transaction is done.
4) If we pre-determine the file names and put them into the database as part of
the transaction and the file is not yet copied, other search requests will get
broken images, especially with slow storage. So the image file name has to be
added to the database only after the file is copied. We need to make this a
separate transaction (with one update statement).
> Transaction deadlocks with high latency file storage
> ----------------------------------------------------
>
> Key: OLIO-45
> URL: https://issues.apache.org/jira/browse/OLIO-45
> Project: Olio
> Issue Type: Bug
> Components: php-app
> Reporter: Akara Sucharitakul
> Assignee: Akara Sucharitakul
>
> The Apache logs show that the AddEventResult.php is incurring deadlocks:
> [Wed Jan 14 11:45:34 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:34 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:41 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:41 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:52 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:52 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> [Wed Jan 14 11:45:52 2009] [error] [client 192.168.100.8] exception
> 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213
> Deadlock found when trying to get lock; try restarting transaction' in
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php:77\nStack
> trace:\n#0
> /var/apache2/2.2/htdocs/web20php2.011309/classes/PDOConnection.php(77):
> PDO->exec('update SOCIALEV...')\n#1
> /var/apache2/2.2/htdocs/web20php2.011309/public_html/addEventResult.php(97):
> PDOConnection->exec('update SOCIALEV...')\n#2 {main}
> This happens for high-latency storage such as a slow NFS server.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.