frankinspace commented on a change in pull request #155:
URL:
https://github.com/apache/incubator-sdap-nexus/pull/155#discussion_r822226270
##########
File path: tools/deletebyquery/deletebyquery.py
##########
@@ -160,16 +161,15 @@ def do_solr_query(query):
break
else:
next_cursor_mark = solr_response.result.nextCursorMark
-
- 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)
Review comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]