Hi,
I have custom meta instructions derived from meta instruction base and other custom classes that will be instantiated in BRE policy using provided vocabularies. the solution works fine in test cases it causes errors wile processing data on concurrent threads during stress test as well as on test systems when processing high volume of data.
the error experienced is related to adding an object to dictionary; following is the error experienced: There was a failure executing the receive pipeline:
.BREXMLReceivePipeline, .Pipelines, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3df7fdf836d11825" Source: "BREPipelineFrameworkComponent" Receive Port: "WcfReceivePort_dataservices" URI: "/services/data.svc" Reason: Unable to instantiate MetaInstruction - .CustomDEHMetaInstructions.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3df7fdf836d11825, exception encountered - An item with the same key has already been added.
up on more introspection of brepipelineframework source the exception seems to be emanating from the class "_BREPipelineMetaInstructionCollection" in BREPipelineFramework, the dictionary used and methods used based on dictionary are not thread safe.
can a concurrent dictionary be used or some kind or locking mechanism while adding objects be used in the class to add instantiated objects to dictionary collection ?
Hi,
I have custom meta instructions derived from meta instruction base and other custom classes that will be instantiated in BRE policy using provided vocabularies. the solution works fine in test cases it causes errors wile processing data on concurrent threads during stress test as well as on test systems when processing high volume of data.
the error experienced is related to adding an object to dictionary; following is the error experienced: There was a failure executing the receive pipeline:
up on more introspection of brepipelineframework source the exception seems to be emanating from the class "_BREPipelineMetaInstructionCollection" in BREPipelineFramework, the dictionary used and methods used based on dictionary are not thread safe.
can a concurrent dictionary be used or some kind or locking mechanism while adding objects be used in the class to add instantiated objects to dictionary collection ?