I have minions updating the same entity which gives concurrency problems, mostly on startup with errors like:
ERROR Message=SQL.UpdateEntity.Fail: Id='Entity-SellableItem-XXXX'|Try='1'|Environment='Entity-CommerceEnvironment-XXXXMinions'|Message='Concurrency error: The Entity version supplied (1220) is no longer the current version.
Therefore I'v tried to set the entities value for the minions in the environment as forexample this one:
{
"$type": "Sitecore.Commerce.Core.MinionPolicy, Sitecore.Commerce.Core",
"WakeupInterval": "01:00:00",
"ListToWatch": "",
"FullyQualifiedName": "Commerce.Engine.Feature.ProductImport.Minions.ImportProductsMinion, Commerce.Engine.Feature.ProductImport",
"ItemsPerBatch": 10,
"Entities": {
"$type": "System.Collections.Generic.List`1[[System.String, mscorlib]], mscorlib",
"$values": [
"Sitecore.Commerce.Plugin.Catalog.SellableItem, Sitecore.Commerce.Plugin.Catalog"
]
}
}
However I still get logs of concurrency errors on startup. My understanding is that minions check if any other minion with the same entity type is running, if one is found it will not run. Where am I going wrong?