This is a migrated thread and some comments may be shown as answers.

Deadlock

2 Answers 81 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 24 Feb 2016, 02:42 PM

Hello,

from time to time i see an db deadlock /Telerik.OpenAccess.Exceptions.DataStoreException when using OpenAccess.

Is there a possiblity to enforce such a deadlock to try out action when such an error occurs?

(using telerik with old IObjectScope)

Best regards

2 Answers, 1 is accepted

Sort by
0
Wolfgang
Top achievements
Rank 1
answered on 24 Feb 2016, 03:26 PM

Got a deadlock now, but how can i acheive the following:

On deadlock i want to retry the last commit one time.

os.Transaction.Commit(); throws a DataStoreException that a Deadlock is found.

objectScope.Transaction.DirtyObjects is empty afterwards, therefore there seems to be a rollback on error (is this somewhere configurable?)

is it possible to redo a commit or to get all sql commands which telerik wants to trigger before a commit is done?

0
Ralph Waldenmaier
Telerik team
answered on 26 Feb 2016, 10:03 AM
Hi Wolfgang,
Unfortunately, there is no way yet to figure out what would have been committed the database and just retry this. The only way to deal with that is to retry the whole operation and register the same operations within a fresh object scope again. A possible helper here could be the library Polly which provides you with retry mechanisms. You can find more information here.

I hope this information is helpful for you.
Do come back in case you have any other question.

Regards,
Ralph Waldenmaier
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
Data Access Free Edition
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Wolfgang
Top achievements
Rank 1
Ralph Waldenmaier
Telerik team
Share this question
or