Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-15278: allow the flush parameter to be passed when doing a DELETE (second take) (#362)

Eric Pugh142b22be05eb
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9279c94c1ea..340c88d0524 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -160,6 +160,8 @@ when told to. The admin UI now tells it to. (Nazerke Seidan, David Smiley)
* SOLR-15617: Add kerberos.name.rules.mechanism support to KerberosPlugin (Kevin Risden)
+* SOLR-15278: Add V2 equivalent to allow deleting async collection list of statuses. (Eric Pugh)
+
Build
---------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java b/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java
index aa50f69e2e6..be5c7de48b6 100644
--- a/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java
+++ b/solr/core/src/java/org/apache/solr/handler/ClusterAPI.java
@@ -104,6 +104,13 @@ public class ClusterAPI {
v1Params.put(REQUESTID, req.getPathTemplateValues().get("id"));
collectionsHandler.handleRequestBody(wrapParams(req, v1Params), rsp);
}
+
+ @EndPoint(method = DELETE,
+ path = "/cluster/command-status",
+ permission = COLL_EDIT_PERM)
+ public void flushCommandStatus(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
+ CollectionsHandler.CollectionOperation.DELETESTATUS_OP.execute(req, rsp, collectionsHandler);
+ }
@EndPoint(method = DELETE,
path = "/cluster/configs/{name}",
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index a57a8c24eb9..93a1e464864 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -215,7 +215,7 @@ curl -X DELETE http://localhost:8983/api/cluster/command-status/1000
Flush out all stored completed and failed async request responses:
[source,bash]
----
-curl -X DELETE http://localhost:8983/api/cluster/command-status
+curl -X DELETE http://localhost:8983/api/cluster/command-status?flush=true
----
====
--
@@ -239,7 +239,6 @@ The request ID of the asynchronous call whose stored response should be cleared.
|===
+
Set to `true` to clear all stored completed and failed async request responses.
-This is required only with the V1 API.
=== Examples using DELETESTATUS