If there is an attachment in the index that is deleted from drupal a "removed" flag is set
in the apachesolr_attachments_files table.
Then next time cron is run this table is checked and any files marked "removed" are
deleted from the index.

If the index table is cleared while there are "removed" flags in the table they are lost.
Then when cron runs it gets nothing from the table and nothing is removed from the index.

It would be good if when the button is clicked it counts the "removed" rows and if there are
any it throws an error.

CommentFileSizeAuthor
#2 698694-retain-removed-2.patch837 bytespwolanin

Comments

pwolanin’s picture

Hmm, good point- or we could just retain those rows.

pwolanin’s picture

Version: 6.x-1.0-alpha2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new837 bytes
pwolanin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Fixed

committed to 1.x branch and HEAD

agileware’s picture

Yeah, that's a better solution. Thanks

robertdouglass’s picture

Status: Fixed » Active

I just removed a file, ran cron, and can still search for that file in the index. Not sure this is fixed.

pwolanin’s picture

did you account for autocommit time?

pwolanin’s picture

Local testing, everything looks right to me - Robert, please confirm or provide steps to reproduce.

pwolanin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.