This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

#1581 closed defect (fixed)

Avoid Whoosh LockErrors

Reported by: jmonnich Owned by: iliastrichopoulos
Priority: high Milestone: v1.9
Component: General Version:
Keywords: Cc:

Description

Whoosh only allows one writer at a time so opening another one fails with a LockError. This is bad UX since users might get an error when trying to create an event if the index is locked.

Using Whoosh's AsyncWriter would most likely solve this.

Change History (6)

comment:1 Changed 14 months ago by pferreir

  • Owner set to iliastrichopoulos
  • Status changed from new to assigned

comment:2 Changed 13 months ago by pferreir

As we've seen, AsyncWriter creates concurrency problems.
This is why we should use PostgreSQL's text search capabilities.

comment:3 Changed 13 months ago by iliastrichopoulos

Code: https://github.com/nop33/indico/tree/move-to-psql-index

Testing the DB migration file:

indico db downgrade
indico db upgrade

The above commands work fine and they drop/create the DB structure as expected.

Importing data using

bin/migration/migrate.py

by running

python bin/migration/migrate.py --run-only reindexCategoryNameAndConferenceTitle --prev-version 1.8


Creating / Renaming / Deleting
Categories and Events is updating the index tables correctly.
Searching for Events using the HTTP API gives correct results.

Could not find HTTP API method to search for Categories, so I tried it from the indico shell and it worked fine.

comment:4 Changed 13 months ago by iliastrichopoulos

  • Status changed from assigned to awaiting_merge

Need to be tested in indico-build. After that it'll be ready to merge.

comment:5 Changed 13 months ago by jmonnich

  • Status changed from awaiting_merge to merging

comment:6 Changed 13 months ago by jmonnich

  • Resolution set to fixed
  • Status changed from merging to closed
Note: See TracTickets for help on using tickets.