Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConcurrencyException with Sitemaps when saving two content items at once (Lombiq Technologies: GOV-33) #15777

Merged
merged 10 commits into from
Apr 17, 2024

Conversation

Piedone
Copy link
Member

@Piedone Piedone commented Apr 17, 2024

Fixes #15743

@Piedone Piedone marked this pull request as ready for review April 17, 2024 00:44
MikeAlhayek
MikeAlhayek previously approved these changes Apr 17, 2024
{
throw new TimeoutException($"Couldn't acquire a lock to update the sitemap within {timeout.Seconds} seconds.");
}
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the else here.

@MikeAlhayek MikeAlhayek dismissed their stale review April 17, 2024 17:05

providing more feedback

Copy link
Member

@MikeAlhayek MikeAlhayek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR fixes the immediate problem. But I think at some point we should add these documents to an index and then use background task to update the site map in bulk.

Locking during publish will slow down publishing for a busy site.

@Piedone
Copy link
Member Author

Piedone commented Apr 17, 2024

Yeah, I thought about doing background processing like it happens with indexing. Why I didn't go down that route, apart from it being much more complex, is that compared to indexing, such sitemap updates should be much quicker and don't inherently require such batch processing.

@MikeAlhayek
Copy link
Member

Yeah, I thought about doing background processing like it happens with indexing. Why I didn't go down that route, apart from it being much more complex, is that compared to indexing, such sitemap updates should be much quicker and don't inherently require such batch processing.

We'll yeah but if you are publishing/unpublishing very frequently, now every request will cause a lock. Again you do not need to implement it here. But I think we should submit an issue so it is tracked and one day this will be converted. At least we know there is an issue that should be addressed at some point.

@Piedone
Copy link
Member Author

Piedone commented Apr 17, 2024

Done: #15783.

@Piedone Piedone merged commit 9b7468b into OrchardCMS:main Apr 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConcurrencyException with Sitemaps when saving two content items at once
2 participants