Hello,
We are got next error in the logs during developing our project:
ERROR EPiServer.Packaging.Storage.StateStorage:ErrorFormat - There are more than one record in StorageUpdateEntity data store for server with id 'guid'. Extra records will be deleted.
I looked into the DB and found that the tblSystemBigTable table really contains two records with the EPiServer.Packaging.Storage.StorageUpdateEntity as the StoreName column values and equal ItemType and ServerId values but with different UpdateDate values.
I started debbuging and found this method in the EPiServer.Packaging.Storage.StateStorage:
public void SaveUpdateDate(DateTime updateDate)
{
this._databaseHandlerAccessor().ExecuteLocked(nameof (StateStorage), (Action) (() =>
{
using (DynamicDataStore store = this._storeFactory.GetOrCreateStore(typeof (StorageUpdateEntity)))
{
StorageUpdateEntity storageUpdateEntity1 = store.Items().FirstOrDefault((Expression>) (p => p.ServerId == this._currentServerId));
if (storageUpdateEntity1 == null)
storageUpdateEntity1 = new StorageUpdateEntity()
{
ServerId = this._currentServerId
};
StorageUpdateEntity storageUpdateEntity2 = storageUpdateEntity1;
storageUpdateEntity2.UpdateDate = updateDate;
store.Save((object) storageUpdateEntity2);
}
}));
}
It is called on initialization process after checking the modified date of the packages.config file and if it is not the same with the latest UpdateDate of the StorageUpdateEntity entity stored in the tblSystemBigTable table.
Then, follow by the SaveUpdateDate method logic, it should create new record to DDS in case there no one entity exists before or just update the UpdateDate of the existent DDS record.
The first case works good.
The second case does not work. It adds new DDS record instead of updation.
Could you please clarify this ocasion to me?
Thanks!