MarcusSorealheis commented on a change in pull request #1702:
URL: https://github.com/apache/lucene-solr/pull/1702#discussion_r463450662
##########
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:
thank you @noblepaul . I couldn't figure out a better way to do this
other then simplifying the exception and conditional
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]