-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 #382
Comments
Thanks for reporting. The answer to this will be 'it depends on a lot of things'. I would strongly encourage you to fully understand the challenges of Lucene in Azure, I did a full talk on this at CodeGarden: https://youtu.be/qXKGVjTlEOk?si=uq7UQ9J5Ka4lTp-j This and similar issues could occur depending on:
This PR will fix the slot swapping issue umbraco/Umbraco-CMS#15571 which is part of Umbraco 13.2 There's a good long thread on a related issue here too umbraco/Umbraco-CMS#15783 but I believe that thread is fixed with umbraco/Umbraco-CMS#15571. As for the error, the top part of the error is what is important:
I've described what the ... Most importantly - this setting can ONLY be applied to the primary node, it cannot be used on several nodes. If you are slot swapping the primary node, than you are in fact load balancing and that means that this setting is being used by 2x nodes. As above - 'it depends on a lot of things'. What could be done in Examine since the SyncedFileSystemDirectoryFactory is part of this codebase (but only Umbraco uses it), is to add some better error handling and diagnostics to output what might be going on. Potentially this is an issue with the files in the main storage and not the local temp storage, but without adding this info to the log, we won't know so that is something I can look into. Many of these reasons is why ExamineX was created. |
We get this on an Umbraco 13.1.0 website if we leave the site alone and dont do anything for a while. Funnily enough our usual deployment process is to
But in this case (by accident) our infra guy has set it up to deploy direct, so that is not in play here. |
@binraider Its hard to say why this would happen. Do you have any logs or anything that can help? This is really an Umbraco specific thing even though the code that Umbraco uses is in this repo. As above, the only thing I can do at this stage would be to add more logging and checks to see how in sync the main storage is vs the local file storage - but at this moment, I don't have the time to do this. One suggestion would be to use |
The Umbraco logs mirror the OP's errors largely: Lucene.Net.Index.CorruptIndexException: invalid deletion count: 2 vs docCount=1 I will change the factory to see if it makes a difference. |
Umbraco has it's own |
Just adding a note that we see this same issue with our Umbraco Cloud (13.4.0) sites using the default configuration. Not surprising as Cloud uses Azure App Services. |
regarding slot swapping - this was created/fixed in Umbraco: https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Examine.Lucene/UmbracoTempEnvFileSystemDirectoryFactory.cs with Umbraco PR umbraco/Umbraco-CMS#15571 which takes into account the site Id - perhaps, part of this needs to be ported to the built-in SyncedTempFileSystemDirectoryFactory. I'm not sure off the top of my head but presumably since SyncedTempFileSystemDirectoryFactory doesn't know anything about Umbraco's own UmbracoTempEnvFileSystemDirectoryFactory to sync locally too, it might be part of the solution ... ah, but i see, this is already taken into account since Umbraco creates the SyncedTempFileSystemDirectoryFactory itself here https://github.com/umbraco/Umbraco-CMS/pull/15571/files#diff-5bf01722a10a69e85bb95802d6e0e7e4baf9b8e6a4abd1caf184f8cdc73c0124R29-R43 |
Examine 3.3.0 has been published, release notes are here https://github.com/Shazwazza/Examine/releases/tag/v3.3.0 |
@Shazwazza even after upgrading Examine to 3.3.0 I am getting this error. I'm on Umbraco 13.4.1 running within Azure. It only happened once so far and I cleared the Examine files. Should I have cleared them after updating Examine, could that have been the issue? |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
11.3.1
Bug summary
Examine index gets corrupt and can't view or manage the Examine dashboard and any content trying to read index for display purpose becomes empty.
Happens on version 11.3.2, but also on 13.1.1 with the only solution to complete delete Examine folder and restart the application.
Issue is already discussed on Our.
Specifics
For an unknown reason the index gets corrupt and bricks the back office dashboard.
Application is hosted on Azure and config is applied as per this guide: https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/setup/server-setup/azure-web-apps
Steps to reproduce
N/A
Expected result / actual result
Expected to be able to at least view the dashboard and rebuild indexes if they get corrupt.
Original post on Umbraco-CMS.
The text was updated successfully, but these errors were encountered: