MarcusSorealheis commented on a change in pull request #1702: URL: https://github.com/apache/lucene-solr/pull/1702#discussion_r463423664
########## File path: solr/core/src/java/org/apache/solr/filestore/PackageStoreAPI.java ########## @@ -131,6 +131,53 @@ public void validateFiles(List<String> files, boolean validateSignatures, Consum static final String TMP_ZK_NODE = "/packageStoreWriteInProgress"; + @EndPoint( + path = "/cluster/files/*", + method = SolrRequest.METHOD.DELETE, + permission = PermissionNameProvider.Name.FILESTORE_WRITE_PERM) + public void delete(SolrQueryRequest req, SolrQueryResponse rsp) { + if (!coreContainer.getPackageLoader().getPackageAPI().isEnabled()) { + throw new RuntimeException(PackageAPI.ERR_MSG); + } + + try { + coreContainer.getZkController().getZkClient().create(TMP_ZK_NODE, "true".getBytes(UTF_8), Review comment: I need to research how to do this better. I did not like this portion of the change but could not find a reliable way to check because of eventual consistency. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org