mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-03-31 05:12:45 +00:00
TantivyBackend now uses open()/close()/_ensure_open() instead of __enter__/__exit__. get_backend() tracks _backend_path and auto-reinitializes when settings.INDEX_DIR changes, fixing the xdist/override_settings isolation bug where parallel workers would share a stale singleton pointing at a deleted index directory. Test fixtures use in-memory indices (path=None) for speed and isolation. Singleton behavior covered by TestSingleton in test_backend.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>