Thread is closed for posting
3 posts, 0 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 24 Feb 2016 Link to this post


    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. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 24 Feb 2016 in reply to Wolfgang Link to this post

    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?

  3. Ralph Waldenmaier
    Ralph Waldenmaier avatar
    202 posts

    Posted 26 Feb 2016 Link to this post

    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.

    Ralph Waldenmaier
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Back to Top