Quantcast
Channel: Microsoft SQL Server Community Samples: Integration Services
Viewing all articles
Browse latest Browse all 582

Created Issue: Race condition in SetupMaxLengthLookup [18522]

$
0
0
G'day,

If you have two (or more) destinations in the one data flow, you can get an exception "An item with the same key has already been added." (see below for stack trace).

I believe that the code within SetupMaxLengthLookup (SharePointUtility\DataObject\ColumnData.vb) needs to have a threading lock added to the creation and population of the Private Shared _columnLengthLookup field.



System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.DataObject.ColumnData.SetupMaxLengthLookup()
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.Adapter.ListsAdapter._Closure$__1._Closure$__2._Lambda$__4(XElement l, XElement m)
at System.Linq.Enumerable.<JoinIterator>d__61`4.MoveNext()
at System.Linq.Enumerable.<UnionIterator>d__81`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.Adapter.ListsAdapter.GetSharePointFields(String listName, String viewId)
at Microsoft.Samples.SqlServer.SSIS.SharePointUtility.ListServiceUtility.GetFields(Uri sharepointUri, String listName, String viewName)
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.GetAccessibleSharePointColumns(String sharepointUrl, String listName, String viewName)
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ValidateSharePointColumns()
at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.Validate()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostValidate(IDTSManagedComponentWrapper100 wrapper)

Viewing all articles
Browse latest Browse all 582

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>