Ticket #695 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

Search indexing broken on ckan.net

Reported by: dread Owned by: pudo
Priority: blocker Milestone:
Component: ckan Keywords:
Cc: Repository:

Description (last modified by dread) (diff)

e.g. searching for 'buddhist' or 'sanskrit', you don't get this newly created package: http://ckan.net/package/digitalsanskritbuddhistcanon

Change History

comment:1 Changed 4 years ago by dread

  • Description modified (diff)

comment:2 Changed 4 years ago by pudo

This is triggered by an issue where having local blinker notifications without asynchronous notifications will break indexing. The issues cause is still unknown, but one possible fix is running CKAN with a queue enabled, synchronous indexing on and no queue consumers attached. Not a real solution, but made possible in cset:a065dbc8041c

comment:3 Changed 4 years ago by pudo

  • Status changed from new to closed
  • Resolution set to wontfix

comment:4 Changed 4 years ago by ollyc

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:5 Changed 4 years ago by ollyc

This is down to blinker not persisting the signal objects. Although the docs claim:

"Every call to signal('name') returns the same signal object, allowing unconnected parts of code (different modules, plugins, anything) to all use the same signal without requiring any code sharing or special imports"

This isn't true unless you maintain a reference to the signal object. To demonstrate this:

>>> import gc
>>> from blinker import signal
>>> signal_id = id(signal('Package'))
>>> gc.collect()
>>> id(signal('Package')) == signal_id

The synchronous notifications code connects to signals without storing the signal objects, which are subsequently garbage collected and hence never fire. The async notifications stores references to all signals as a class attribute, so this problem is not seen when async notifications are enabled.

comment:6 Changed 4 years ago by dread

Superb finding Friedrich! Any chance of a quick fix for metastable then?

comment:7 Changed 4 years ago by dread

Sorry, I meant Olly!

comment:9 Changed 4 years ago by dread

  • Status changed from reopened to closed
  • Resolution set to fixed

These changesets do the trick. I've:

  • merged Ollie's changes into default and metastable branches.
  • updated ckan.net to latest metastable and reindexed it.
  • ckan.net now searches on latest packages, including sanskrit example.
  • test-hmg.ckan.net also updated to latest metastable for testing with UAT.
  • ckanhmg is to be updated next week and DGU ticket remains for this.
Note: See TracTickets for help on using tickets.