U4-4020 - High concurrent publishing causes error "An item with the same key has already been added" in ContentService.SaveAndPublish

Created by Shannon Deminick 10 Jan 2014, 00:11:28 Updated by Shannon Deminick 24 Apr 2014, 06:41:44

High concurrent/multi-threaded requests that call ContentService.SaveAndPublish will generate the error:

System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at Umbraco.Core.Models.EntityBase.TracksChangesEntityBase.ResetDirtyProperties(Boolean rememberPreviouslyChangedProperties) at Umbraco.Core.Models.ContentBase.ResetDirtyProperties(Boolean rememberPreviouslyChangedProperties) at Umbraco.Core.Models.Content.ResetDirtyProperties() at Umbraco.Core.Persistence.Repositories.ContentRepository.PersistUpdatedItem(IContent entity) at Umbraco.Core.Persistence.Repositories.RepositoryBase2.PersistUpdatedItem(IEntity entity) at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() at Umbraco.Core.Services.ContentService.SaveAndPublishDo(IContent content, Int32 userId, Boolean raiseEvents) at Umbraco.Core.Services.ContentService.SaveAndPublish(IContent content, Int32 userId, Boolean raiseEvents)

Comments

Shannon Deminick 24 Apr 2014, 06:41:44

Fixed in this rev with updated examine lib: 1ada5210ad720ffa282901fc04a40c31de1b92f6


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0, 6.1.0, 7.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.1.1, 6.0.6, 6.0.5, 6.0.7, 6.1.2, 6.2.0, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 7.0.1, 7.0.2

Due in version: 7.1.0, 6.2.0

Sprint:

Story Points:

Cycle: