You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sdap.apache.org by GitBox <gi...@apache.org> on 2022/03/09 02:01:39 UTC

[GitHub] [incubator-sdap-nexus] frankinspace commented on a change in pull request #155: SDAP-367: Updated deletebyquery tool to improve speed

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: dev-unsubscribe@sdap.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org