ciur / papermerge

Open Source Document Management System for Digital Archives (Scanned Documents)
https://papermerge.com
Apache License 2.0
2.42k stars 258 forks source link

Worker infinite loop index updates #502

Closed ciur closed 1 year ago

ciur commented 1 year ago

Component: backend (papermerge-core) Version: 2.1.3

While removing mptt dependency papermerge.search.tasks.update_index was changed: instead of updating index for each individual instance - the whole index is updated (similarly to invoking ./manage.py update_index).

However, that change results in infinite loop index updates - one single node update will make worker spend in infinite loop updating whole index over and over.

Yet another problem popped up - after node move - indexes of all moved nodes (i.e. moved node and all its descendants) instances should be updated as well, otherwise search results will reveal nodes with outdated breadcrumbs.