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

SDAP-367: Updated deletebyquery tool to improve speed #155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skorper
Copy link
Member

@skorper skorper commented Mar 9, 2022

  • Improved speed of deletebyquery tool by moving cassandra delete to each solr page delete
  • Added -f and --force flag that will skip the prompts before deleting


doc_ids.extend([uuid.UUID(doc['id']) for doc in solr_response.result.response.docs])
ids = [uuid.UUID(doc['id']) for doc in solr_response.result.response.docs]
delete_from_cassandra(ids)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you moved the cassandra delete into the do_solr_query function? This seems like it would break things. do_solr_query is collecting all of the tile ids that need to be deleted. Once that is done it asks the user to confirm the number of documents before executing the delete. With this new flow, the cassandra rows get removed before the solr docs and a user could decide to cancel without realizing data has already been deleted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@frankinspace Whoops, good point. I'll refactor this

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