Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,21 @@ public class UpgradeCoreIndexRequestBody {
"updateChain to be used for reindexing during index upgrade if you don't want to use the one used by /update by default")
@JsonProperty
public String updateChain;

@Schema(
description =
"Internal flag set by the collection-level UPGRADECOLLECTIONINDEX command to indicate"
+ " this upgrade is being coordinated by SolrCloud. When true, the SolrCloud guard is"
+ " bypassed, a local-only update chain is used (no distributed forwarding), and the"
+ " core's readOnly flag is temporarily cleared for the duration of the upgrade.")
@JsonProperty
public Boolean cloudMode;

@Schema(
description =
"When true, only checks whether the index contains old-format segments without performing"
+ " any upgrade. Returns the number of segments needing upgrade and whether the index"
+ " is already at the current Lucene format. No writes are performed.")
@JsonProperty
public Boolean checkOnly;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ public class UpgradeCoreIndexResponse extends SolrJerseyResponse {
@Schema(description = "Status of the core index upgrade operation.")
@JsonProperty
public String upgradeStatus;

@Schema(
description =
"Whether the index is fully at the current Lucene format. Set when checkOnly=true.")
@JsonProperty
public Boolean indexUpgraded;
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import static org.apache.solr.common.params.CollectionParams.CollectionAction.REPLACENODE;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.RESTORE;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.SPLITSHARD;
import static org.apache.solr.common.params.CollectionParams.CollectionAction.UPGRADECOLLECTIONINDEX;
import static org.apache.solr.common.params.CommonParams.NAME;

import io.opentelemetry.api.trace.Span;
Expand Down Expand Up @@ -189,7 +190,8 @@ private CommandMap(OverseerNodePrioritizer overseerPrioritizer, CollectionComman
Map.entry(ADDREPLICA, new AddReplicaCmd(ccc)),
Map.entry(MOVEREPLICA, new MoveReplicaCmd(ccc)),
Map.entry(REINDEXCOLLECTION, new ReindexCollectionCmd(ccc)),
Map.entry(RENAME, new RenameCmd(ccc)));
Map.entry(RENAME, new RenameCmd(ccc)),
Map.entry(UPGRADECOLLECTIONINDEX, new UpgradeCollectionIndexCmd(ccc)));
}

CollApiCmds.CollectionApiCommand getActionCommand(CollectionParams.CollectionAction action) {
Expand Down
Loading
Loading