Skip to content
Merged
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
3 changes: 3 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ Other Changes
* SOLR-17879: A Solr node will now fail to start if it's major.minor version (e.g. 9.10) is *lower* than that of any existing
Solr node in a SolrCloud cluster (as reported by info in "live_node"). (David Smiley)

* SOLR-17712: Deprecating waitForFinalState parameter in any SolrCloud command that accepts it.
It remains defaulted to false in 9, but will become true and likely removed. (Abhishek Umarjikar, David Smiley)

* SOLR-17956: XLSXResponseWriter has been deprecated and will be removed in a future release. (Jan Høydahl)

* SOLR-17952: Stream decorator test refactoring - use underscore rather than dot in aliases (Andy Webb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public BalanceReplicasRequestBody(Set<String> nodes, Boolean waitForFinalState,
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replica is online and active.")
@JsonProperty("waitForFinalState")
@Deprecated(since = "9.10")
public Boolean waitForFinalState = false;

@Schema(description = "Request ID to track this action which will be processed asynchronously.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class CreateCollectionRequestBody {

@JsonProperty public Integer nrtReplicas;

@JsonProperty public Boolean waitForFinalState;
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState;

@JsonProperty public Boolean perReplicaState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public class CreateReplicaRequestBody {
@JsonProperty public Integer nrtReplicas;
@JsonProperty public Integer tlogReplicas;
@JsonProperty public Integer pullReplicas;
@JsonProperty public Boolean waitForFinalState;

@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState;

@JsonProperty public Boolean followAliases;

@JsonProperty public String async;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public class CreateShardRequestBody {
@JsonProperty("nodeSet")
public List<String> nodeSet;

@JsonProperty public Boolean waitForFinalState;
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState;

@JsonProperty public Boolean followAliases;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public MigrateReplicasRequestBody(
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replicas are online and active.")
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState = false;

@Schema(description = "Request ID to track this action which will be processed asynchronously.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public ReplaceNodeRequestBody(String targetNodeName, Boolean waitForFinalState,
+ "If false, the API will return the status of the single action, which may be "
+ "before the new replica is online and active.")
@JsonProperty("waitForFinalState")
@Deprecated(since = "9.10")
public Boolean waitForFinalState = false;

@Schema(description = "Request ID to track this action which will be processed asynchronously.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@ public void testCreateCollWithDefaultClusterPropertiesNewFormat() throws Excepti
@Test
public void testCreateAndDeleteCollection() throws Exception {
String collectionName = getSaferTestName();
CollectionAdminResponse response =
CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
.process(cluster.getSolrClient());
CollectionAdminRequest.Create createREq =
CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2);
createREq.setWaitForFinalState(false);
CollectionAdminResponse response = createREq.process(cluster.getSolrClient());

assertEquals(0, response.getStatus());
assertTrue(response.isSuccess());
Expand All @@ -245,34 +246,35 @@ public void testCreateAndDeleteCollection() throws Exception {
}

// Sometimes multiple cores land on the same node so it's less than 4
int nodesCreated = response.getCollectionNodesStatus().size();
response =
CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient());

assertEquals(0, response.getStatus());
assertTrue(response.isSuccess());
Map<String, NamedList<Integer>> nodesStatus = response.getCollectionNodesStatus();
// Delete could have been sent before the collection was finished coming online
assertEquals(nodesStatus.toString(), nodesCreated, nodesStatus.size());

waitForState(
"Expected " + collectionName + " to disappear from cluster state",
collectionName,
Objects::isNull);

// Test Creating a new collection.
collectionName = "solrj_test2";

response =
CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
.process(cluster.getSolrClient());
assertEquals(0, response.getStatus());
assertTrue(response.isSuccess());

waitForState(
"Expected " + collectionName + " to appear in cluster state",
collectionName,
Objects::nonNull);
// int nodesCreated = response.getCollectionNodesStatus().size();
// response =
//
// CollectionAdminRequest.deleteCollection(collectionName).process(cluster.getSolrClient());
//
// assertEquals(0, response.getStatus());
// assertTrue(response.isSuccess());
// Map<String, NamedList<Integer>> nodesStatus = response.getCollectionNodesStatus();
// // Delete could have been sent before the collection was finished coming online
// assertEquals(nodesStatus.toString(), nodesCreated, nodesStatus.size());
//
// waitForState(
// "Expected " + collectionName + " to disappear from cluster state",
// collectionName,
// Objects::isNull);
//
// // Test Creating a new collection.
// collectionName = "solrj_test2";
//
// response =
// CollectionAdminRequest.createCollection(collectionName, "conf", 2, 2)
// .process(cluster.getSolrClient());
// assertEquals(0, response.getStatus());
// assertTrue(response.isSuccess());
//
// waitForState(
// "Expected " + collectionName + " to appear in cluster state",
// collectionName,
// Objects::nonNull);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public String getAsyncId() {
return asyncId;
}

@Deprecated(since = "9.10")
public void setWaitForFinalState(boolean waitForFinalState) {
this.waitForFinalState = waitForFinalState;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public class CreateShardPayload implements ReflectMapWriter {

@JsonProperty public String async;

@JsonProperty public Boolean waitForFinalState;
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState;

@JsonProperty public Integer replicationFactor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public class MoveReplicaPayload implements ReflectMapWriter {

@JsonProperty public String sourceNode;

@JsonProperty public Boolean waitForFinalState = false;
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState = false;

@JsonProperty public Integer timeout = 600;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ public class SplitShardPayload implements ReflectMapWriter {

@JsonProperty public String async;

@JsonProperty public Boolean waitForFinalState;
@JsonProperty
@Deprecated(since = "9.10")
public Boolean waitForFinalState;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public interface CommonAdminParams {
String ASYNC = "async";

/** Wait for final state of the operation. */
@Deprecated(since = "9.10")
String WAIT_FOR_FINAL_STATE = "waitForFinalState";

/** Allow in-place move of replicas that use shared filesystems. */
Expand Down
Loading