Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Retention Clean failed

    Scheduled Pinned Locked Moved Support
    buildmaster
    2 Posts 1 Posters 1 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Would someone be able to help me figure out why?

      Error:

      RP (ID=2): Error during purge: System.Data.SqlClient.SqlException (0x80131904): 547160Releases_PurgeReleaseData164The DELETE statement conflicted with the REFERENCE constraint "FK__ChangeControlEnvironments__ChangeControls". The conflict occurred in database "BuildMaster", table "dbo.ChangeControlEnvironments", column 'ChangeControl_Id'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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)
      at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
      at Inedo.Data.SqlServerDataFactory.ExecuteNonQuery(String storedProcName, IList`1 parameters)
      at Inedo.BuildMaster.Windows.ServiceApplication.Retention.ReleaseRetentionPolicy.Purge()
      at Inedo.BuildMaster.Windows.ServiceApplication.RetentionPolicyExecuter.Execute()
      ClientConnectionId:9114d3f8-3637-4823-b8b8-d5c1a5532650

      Product: BuildMaster
      Version: 4.8.6

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        This is a bug in the Release_PurgeReleaseData stored procedure that was fixed in a later version.

        You can patch it by editing it and removing these lines:

        /* 2c) Configuration */
            DELETE [ChangeControls]
             WHERE [Application_Id] = @Application_Id AND [Release_Number] = @Release_Number
        

        NOTE: make sure it's the 2c) line and the 2 following you delete... the 2d) one is correct. (The delete from the ChangeControls table is in there twice for some reason, which is the cause of this bug.)

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation