You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.
Let me give a brief introduction on how our content is structured in the Umbraco CMS: We have an Episode node, that's parent node. Beneath that node we have a VideoAsset node (defined as UmbracoProperty), which is child node. We tracked the root cause of this issue and found out that the call to method .As<T> (part of the Ditto assembly) returned back a wrong child video asset. However, everything looks okay in the database.
This is the use-case when issue happens:
We have an endpoint which is getting Episode (IPublishedContent) by Id from the CMS and sending SNS message to our other services. In small period of time we're sending over a 1k requests to this endpoint, picking up content, casting it with Ditto and sending SNS message further.
This process is separated from publishing content item in the CMS.
Issue can not be reproduced when we're publishing single episode.
The text was updated successfully, but these errors were encountered:
To be upfront and realistic about expectations, I haven't worked on Ditto in the past 3 years, so my knowledge of its inner workings is now quite hazy. I wouldn't expect a bug-fix/patch-release to come from me for this issue, (my free/open-source priorities are elsewhere these days).
My initial thought is that you've found a concurrency bug (in Ditto). With the 1,000 requests hitting the API endpoint in quick succession, I suspect that something in Ditto's internal caching is wrong value/property.
Is your API service something that is actively being developed? and are you the developer?
With 3 years hindsight, my recommendation would be to remove the Ditto .As<T>() call and manually map the IPublishedContent objects to the view-models. That way, you reduce the amount of Reflection/processing required to construct and populate the view-models.
Personally, for Umbraco v8/v9, I've been using the built-in ModelsBuilder objects as my view-models.
I'm not sure how much this helps you. I'm happy to keep this open, but I'm not actively continuing development of Ditto.
On a side-note, if anyone else reading this would like to fork Ditto and continue the maintenance, I'm happy to hand over the repository. 👍
Thanks for your honest answer. Since our API is actively being developed I have already started with manual mapping of IPublishedContent to the models. This would definitely solve our problems - we just wanted to find a shortcut if possible :)
Let me give a brief introduction on how our content is structured in the Umbraco CMS: We have an
Episode
node, that's parent node. Beneath that node we have aVideoAsset
node (defined asUmbracoProperty
), which is child node. We tracked the root cause of this issue and found out that the call to method.As<T>
(part of the Ditto assembly) returned back a wrong child video asset. However, everything looks okay in the database.This is the use-case when issue happens:
We have an endpoint which is getting Episode (
IPublishedContent
) by Id from the CMS and sending SNS message to our other services. In small period of time we're sending over a 1k requests to this endpoint, picking up content, casting it with Ditto and sending SNS message further.This process is separated from publishing content item in the CMS.
Issue can not be reproduced when we're publishing single episode.
The text was updated successfully, but these errors were encountered: