Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michel Collard 36 posts 236 karma points
    1 week ago
    Michel Collard
    0

    Cannot insert duplicate key row in object 'dbo.vendrFrozenPrice'

    Hi,

    Sorry for posting twice today.

    We have another error in the log we could not get our head around. Is there any information on the exception below?

    • Umbraco version 8.8.0
    • Vendr version v1.3.2

    This is the exception:

      Exception
    System.Data.SqlClient.SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.vendrFrozenPrice' with unique index 'IX_vendrFrozenPrice_compositeId'. The duplicate key value is (db575589-fefc-4a25-a34d-8d1952cf0ac9, f97546cb-fb8c-46cc-8221-3e8727e71fe7_db575589-fefc-4a25-a34d-8d1952cf0ac9_c7b3b057-c207-4e3f-8e6a-8aa4254cd790, <NULL>, <NULL>, 830524f9-9898-493b-8bc1-710586a17a6b).
    The statement has been terminated.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) in D:\a\1\s\src\Umbraco.Core\Persistence\FaultHandling\RetryPolicy.cs:line 172
       at NPoco.Database.ExecuteNonQueryHelper(DbCommand cmd)
       at NPoco.Database.InsertImp[T](PocoData pocoData, String tableName, String primaryKeyName, Boolean autoIncrement, T poco)
    ClientConnectionId:2a0fbd1b-efe8-43ab-b0e7-6835c196b759
    Error Number:2601,State:1,Class:14
    
  • Matt Brailsford 2852 posts 14824 karma points MVP 7x c-trib
    1 week ago
  • Michel Collard 36 posts 236 karma points
    1 week ago
    Michel Collard
    0

    I'm sorry, need some sleep I guess :D
    I just edited my post!

  • Matt Brailsford 2852 posts 14824 karma points MVP 7x c-trib
    1 week ago
    Matt Brailsford
    0

    Ok, so it doesn't tell me a great deal anyway, but ultimately it looks like it's trying to re-freeze a price for a product on an order (Read here for more info on price freezing https://vendr.net/docs/core/1-3-0/key-concepts/price-freezing/)

    I can't really grasp why this would occur as price freezing goes via the product price freezer which always does a lookup to see if one exists prior to freezing a price.

    Do you have any replication steps to reproduce this? Is there anything that could be affecting this? server infrastructure / custom code?

    Matt

  • Michel Collard 36 posts 236 karma points
    1 week ago
    Michel Collard
    100

    For completeness.

    This problem was solved.

    We had an issue with the product page which tried to save the order entity multiple times.

    This was also the reason for this problem: https://our.umbraco.com/packages/website-utilities/vendr/vendr-support/104214-deadlock-on-orderservicesaveorder-order-entity#comment-325285

  • Matt Brailsford 2852 posts 14824 karma points MVP 7x c-trib
    1 week ago
    Matt Brailsford
    0

    Thanks for coming back and confirming the issue. Hopefully it might help someone else in the future should they have the same problem.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft