-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.1.0 CE GA1, 6.1.10 EE GA1
-
Fix Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2, 6.2.0 CE M2
-
Component/s: Core Infrastructure
-
Labels:None
-
Environment:Tomcat 7.0.x, SQL Server 2008 R2
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Fix Priority:5
-
Git Pull Request:
Problem:
The upgrade for portletpreferences table does not take into consideration huge amounts of data. Doing an upgrade fails when a large amount of data (say 120,000 rows) are part of the table. When the database runs the select statement, it does a read lock on the row. Then it tries to update the row by first doing a write lock. Some databases will realize that the read has finished, and the allow the write lock and subsequent update to the row, while others (like SQL Server) will hold the update until the thread for the read lock is finished. However, the thread for the read lock won't finish until the write statements to the whole table are done. There is a big chance of deadlock happening.
Proposed solution:
Reuse the connection to see if that fixes the issue.