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

Concurrency on indexing #8082

Closed
MatteoPiovanelli-Laser opened this issue Jul 16, 2018 · 3 comments · Fixed by #8094
Closed

Concurrency on indexing #8082

MatteoPiovanelli-Laser opened this issue Jul 16, 2018 · 3 comments · Fixed by #8094

Comments

@MatteoPiovanelli-Laser
Copy link
Contributor

This error looks similar to what we worked on for concurrency:

ERROR GenericADOException thrown from IContentHandler by Orchard.Indexing.Handlers.CreateIndexingTaskHandler
NHibernate.Exceptions.GenericADOException: could not execute query
[ select indexingta0_.Id as Id5888_, indexingta0_.Action as Action5888_, indexingta0_.CreatedUtc as CreatedUtc5888_, indexingta0_.ContentItemRecord_id as ContentI4_5888_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0 ]
  Name:p1 - Value:Orchard.ContentManagement.Records.ContentItemRecord
[SQL: select indexingta0_.Id as Id5888_, indexingta0_.Action as Action5888_, indexingta0_.CreatedUtc as CreatedUtc5888_, indexingta0_.ContentItemRecord_id as ContentI4_5888_ from Orchard_Indexing_IndexingTaskRecord indexingta0_ where indexingta0_.ContentItemRecord_id=@p0] ---> System.Data.SqlClient.SqlException: La transazione (ID di processo 170) è stata interrotta a causa di un deadlock delle risorse blocco con un altro processo. Ripetere la transazione.
@MatteoPiovanelli-Laser
Copy link
Contributor Author

Note that this often happens when indexing is enabled on a tenant, and we try to upload several images at the same time from the MediaLibrary UI

@MatteoPiovanelli-Laser
Copy link
Contributor Author

This created a funny situation, being that there was an indexing task for a ContentItemRecord that did not exist, and that caused every BatchIndex execution to fail and log the same error over and over.

@MatteoPiovanelli-Laser
Copy link
Contributor Author

I gave quick look at how the IndexingTaskRecord is used. It's always through an IRepository, and we never call an Update. This is most likely one of those cases we can fix easily with the NOLOCK stuff we did in dev. I'll figure out a way to reliably cause this issue and get back.

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 a pull request may close this issue.

2 participants