-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Switch to Sygil-Dev/whoosh-reloaded #1645
Comments
Yes, whoosh-reloaded definitely looks more alive. Maybe that also fixes the warnings seen about whoosh using "is" instead of "==". |
Some tests are failing with whoosh-reloaded 2.7.5. Following command gives an error:
The index is not closed as before with whoosh 2.7.4. Is this important or can we just remove the failing assert statement? |
Check if the amount of open files stays at some level or is always increasing. |
Did some experiments:
@RogerHaase Can you remember why you added this? It looks like the original first assert is expecting too much (the backend is not deinitialised yet). The second assert (which I added to check) succeeds, so everything is closed correctly there. |
No, don't remember. In general, Windows has similar non-repeatable issues with files left open. I am thinking that |
@bylsmad do you remember why the above was added? |
I think the check for open files might be useful, but it should be done at that 2nd place, when we can really expect index files to be closed. |
Now struggling with index files left open by whoosh, but I have the failure reproducible on Linux now so hoping to have a clean test run soon
latest test fail: https://github.com/bylsmad/moin/actions/runs/5102359184/jobs/9171871358 Originally posted by @bylsmad in #1455 (comment) The old logs are not accessible any more. For me it looks like the |
the check for the open files is there because the test tear down deletes all the files in the test wiki the tear down was intermittently failing on windows because of open file handles, windows does not allow deletion of the index files when there are open file handles the assertion was added to allow me to test this issue on Linux by raising an AssertionError which mirrors the windows PermissionError for attempt to delete the index when there are open file handles bottom line is the test will fail on windows if there remain open file handles when you reach teardown, I found that adding a gc.collect in |
Guess the "tear down" should not delete the whoosh index files as long as they could be open. Maybe something there is in wrong order, they are closed in destroy_app. |
I have found that removing gc.collect() in indexing.py fixes the issue. gc.collect() affects performance and IMO should not be used in every store_revision() call. I have moved it to conftest.py in case of a PermissionError. Please test above PR in a Win environment. |
Created new wiki with help files, updated an item, viewed indexes, history, all ok, but 2 failing tests. See attached files: |
Thanks for testing. Can you do two more tests with
When it runs successful on whoosh 2.7.4 we can raise an issue for whoosh.reloaded. Maybe we can ask for an option for close() to be a true close without caching the connection. The cli move-index function is executed in a separate process, so that the situation differs from that of the test module, where it is executed in the same process as the rebuild and update. |
Master branch tests, no errors on 274, 1 failure on whoosh-reloaded: |
There has been no human activity in the whoosh-reloaded repo in the last 6 months. A pull request was automatically closed after 60 days of no activity. I've spent a lot of time testing and always run into the locking/timeout issue with locust. I'm giving up at the moment. We should remove the issue from the 2.0.0b1 milestone. |
We use whoosh for indexing. The currently used package https://github.com/mchaput/whoosh is no longer maintained.
There is a successor at https://github.com/Sygil-Dev/whoosh-reloaded.
The text was updated successfully, but these errors were encountered: