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
With the Sitemaps module enabled, you can get ConcurrencyException when saving two content items that are in the sitemaps simultaneously.
To Reproduce
Enable and configure the Sitemaps module.
Publish two content items at the same time. This needs a slower webserver/DB server, or you can simulate it by adding Thread.Sleep(5000); to SitemapManager.UpdateSitemapAsync().
Experience "ConcurrencyException: The document could not be updated as it has been changed by another process"
This can be fixed by putting sitemap updates in SitemapManager within a distributed lock, and instead of starting updates from a content handler, just adding a deferred task and doing the update there. So, updates would be synchronized without an adverse effect on the UX.
Screenshots
The text was updated successfully, but these errors were encountered:
Ah OK, just because you were asking about a PR in context of 1.9 issues.
But now it comes to me that this is definitely not a post-1.8 regression, since I have this with a client project on 1.7 (but the affected code is the same in main too).
Describe the bug
With the Sitemaps module enabled, you can get
ConcurrencyException
when saving two content items that are in the sitemaps simultaneously.To Reproduce
Thread.Sleep(5000);
toSitemapManager.UpdateSitemapAsync()
.Expected behavior
Both publishes just work.
This is because
ContentTypesSitemapUpdateHandler
runs for every publish and updates the same single document. I guess the same issue can happen with simultaneous content item removals due to the same reason.This can be fixed by putting sitemap updates in
SitemapManager
within a distributed lock, and instead of starting updates from a content handler, just adding a deferred task and doing the update there. So, updates would be synchronized without an adverse effect on the UX.Screenshots
The text was updated successfully, but these errors were encountered: