Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Postgres Updates with Solr #802

Closed
jkmarx opened this issue Dec 4, 2015 · 9 comments
Closed

Sync Postgres Updates with Solr #802

jkmarx opened this issue Dec 4, 2015 · 9 comments

Comments

@jkmarx
Copy link
Member

jkmarx commented Dec 4, 2015

Reproduce

  1. Locally in the admin interface http://192.168.50.50:8000/admin, delete an analysis. (Please note the uuid and which dataset it belongs to.)
  2. Locally in the regular view http://192.168.50.50:8000/#/ , go to the dataset browser
  3. Click on the analysis filter

Observed

Note, all the 0 were previously deleted analyses. The analysis with 1, I just deleted and Solr still maintains the info.
screen shot 2015-12-04 at 2 43 22 pm

Expected

Deleted analyses to not show in the filter.

@scottx611x
Copy link
Member

Related with #711 #710

@scottx611x scottx611x self-assigned this Dec 8, 2015
@ngehlenborg ngehlenborg modified the milestones: Next, Lakeville Dec 8, 2015
@jkmarx
Copy link
Member Author

jkmarx commented Dec 9, 2015

I was able to clean up the old analyses by deleting and reindexing. ./manage.py rebuild_index --using=data_set_manager --batch-size=25

@scottx611x
Copy link
Member

According to @flekschas : "This is probably caused by the fact that Solr's index is not destroyed when running vagrant destroy. To avoid it: either delete the vm completely or rebuild / drop Solr's index."

@jkmarx jkmarx closed this as completed Dec 9, 2015
@hackdna hackdna reopened this Dec 10, 2015
@scottx611x
Copy link
Member

@fritz You mentioned that you have performed something along these lines before. Could you point me to that code?

@flekschas
Copy link
Member

@scottx611x
Yep for the datasets. For example when you delete a dataset the pre_delete signal will trigger an index update:

  1. Signal: https://github.com/parklab/refinery-platform/blob/develop/refinery/core/models.py#L601
  2. Deletion: https://github.com/parklab/refinery-platform/blob/develop/refinery/core/utils.py#L198-L203

@hackdna
Copy link
Member

hackdna commented Dec 15, 2015

Any considerations for pre_delete vs post_delete?

@flekschas
Copy link
Member

How do you want to access the dataset instance after it was deleted?

@hackdna
Copy link
Member

hackdna commented Dec 15, 2015

So, pre_delete must be used?

@scottx611x
Copy link
Member

The fix from commit: 1c25ce3 seems to work only 90% of the time.
Once in a while upon Analysis deletion something remains within Solr.

See:
screen shot 2015-12-17 at 1 36 32 pm

Currently looking into this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants