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

Deleting seeds leaves orphaned historical seeds #847

Open
justinlittman opened this issue Jun 22, 2017 · 0 comments
Open

Deleting seeds leaves orphaned historical seeds #847

justinlittman opened this issue Jun 22, 2017 · 0 comments
Labels
Milestone

Comments

@justinlittman
Copy link
Contributor

These orphaned historical seeds cause deserialization errors when importing the collection.

Note that this is for actual deleting of seeds, not just marking a seed as inactive.

Steps to reproduce:

  1. Create a Twitter user timeline collection with multiple seeds.
  2. Perform some harvests.
  3. Delete a seed using the Admin interface.
  4. Serialize the collection using the serializecollection management command.
  5. Copy the collection files to a clean SFM instance.
  6. Deserialize the collection using the deserializecollection management command.

Excepted result:
Collection is imported.

Actual result:
Deserialization error

The primary reason that seeds are manually deleted is because of duplicate seeds. The need for this should be reduced with improvements in seed duplication validation.

Workaround:
Delete the orphaned historical seeds with:

delete from ui_harvest_historical_seeds
where historicalseed_id in
(
select hs.history_id
from ui_historicalseed hs
left outer join ui_seed s on hs.id=s.id
where s.id is null);

delete from ui_historicalseed hs
where hs.id not in
(select s.id from ui_seed s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant