Skip to content

Commit 107348f

Browse files
authored
SOLR-17778: Remove unused FORCEPREPAREFORLEADERSHIP operation (#3404)
This removes a core admin operation that does nothing, but was still visible in SolrJ.
1 parent 1490cf8 commit 107348f

File tree

3 files changed

+2
-30
lines changed

3 files changed

+2
-30
lines changed

solr/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ Deprecation Removals
133133

134134
* SOLR-17698: Removed deprecated EnumField field type. (Eric Pugh, David Smiley)
135135

136+
* SOLR-17778: Removed no-op core admin operation FORCEPREPAREFORLEADERSHIP and its SolrJ peer OverrideLastPublished. (Pierre Salagnac)
137+
136138
Dependency Upgrades
137139
---------------------
138140

solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -411,34 +411,6 @@ public void setCollection(String collection) {
411411
}
412412
}
413413

414-
public static class OverrideLastPublished extends CoreAdminRequest {
415-
protected String state;
416-
417-
public OverrideLastPublished() {
418-
action = CoreAdminAction.FORCEPREPAREFORLEADERSHIP;
419-
}
420-
421-
@Override
422-
public SolrParams getParams() {
423-
if (action == null) {
424-
throw new RuntimeException("no action specified!");
425-
}
426-
ModifiableSolrParams params = new ModifiableSolrParams();
427-
params.set(CoreAdminParams.ACTION, action.toString());
428-
params.set(CoreAdminParams.CORE, core);
429-
params.set("state", state);
430-
return params;
431-
}
432-
433-
public String getState() {
434-
return state;
435-
}
436-
437-
public void setState(String state) {
438-
this.state = state;
439-
}
440-
}
441-
442414
public static class MergeIndexes extends CoreAdminRequest {
443415
protected List<String> indexDirs;
444416
protected List<String> srcCores;

solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ public enum CoreAdminAction {
176176
OVERSEEROP,
177177
REQUESTSTATUS(true),
178178
REJOINLEADERELECTION,
179-
// internal API used by force shard leader election
180-
FORCEPREPAREFORLEADERSHIP,
181179
// Internal APIs to back up and restore a core
182180
BACKUPCORE,
183181
RESTORECORE,

0 commit comments

Comments
 (0)