View Issue Details

IDProjectCategoryView StatusLast Update
0006716SymmetricDS ProImprovementpublic2025-02-05 02:43
Reporterpbelov Assigned Topbelov  
Prioritynormal 
Status assignedResolutionopen 
Product Version3.15.0 
Target Version3.15.13 
Summary0006716: Deadlocks on Sybase due to default table locking scheme being overly restrictive
DescriptionSymmetricDS uses multiple threads to update internal and customer tables.
If a Sybase database server has overly restrictive locking scheme (allpages or datapages) this could result in SymmetricDS processes issuing dead-locked queries, which hurts performance (batch must be re-tried later).

Solution is to update SymmetricDS class AseDdlBuilder to create all tables with the locking scheme set to "datarows" explicitly. This will override default locking scheme set by DBA (or a lack of such setting resulting in a problematic default "allpages" scheme).
Steps To ReproduceLoad 3 large tables.
Observe at least two queries dead-locked - using the sp_lock2 built-in stored procedure.
  one query with column BlockedState = 'Blocked'
  and onether query with BlockedState='Blocking'

Additional InformationOriginally reported by Benjamin S. (and independently by Phillip M.)
https://sourceforge.net/p/symmetricds/discussion/739236/thread/c6964e72ea/?limit=25
https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc20021_1251/html/locking/X12029.htm
Tagsdialect: sybase

Activities

pbelov

2025-02-05 02:43

manager   ~0002604

PR for review: https://github.com/JumpMind/symmetric-ds/pull/222

Issue History

Date Modified Username Field Change
2025-02-05 02:24 pbelov New Issue
2025-02-05 02:24 pbelov Status new => assigned
2025-02-05 02:24 pbelov Assigned To => pbelov
2025-02-05 02:24 pbelov Tag Attached: dialect: sybase
2025-02-05 02:33 pbelov Description Updated View Revisions
2025-02-05 02:35 pbelov Steps to Reproduce Updated View Revisions
2025-02-05 02:35 pbelov Summary Deadlocks on Sybase due to default table lock scheme being too optimistic => Deadlocks on Sybase due to default table lock scheme being overly restrictive
2025-02-05 02:37 pbelov Summary Deadlocks on Sybase due to default table lock scheme being overly restrictive => Deadlocks on Sybase due to default table locking scheme being overly restrictive
2025-02-05 02:43 pbelov Note Added: 0002604