You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/05/26 16:55:25 UTC

[GitHub] [solr] NazerkeBS opened a new pull request #152: SOLR-15311: Filter ASYNC key in during collection update

NazerkeBS opened a new pull request #152:
URL: https://github.com/apache/solr/pull/152


   https://issues.apache.org/jira/browse/SOLR-15311
   
   <!--
   _(If you are a project committer then you may remove some/all of the following template.)_
   
   Before creating a pull request, please file an issue in the ASF Jira system for Solr:
   
   * https://issues.apache.org/jira/projects/SOLR
   
   You will need to create an account in Jira in order to create an issue.
   
   The title of the PR should reference the Jira issue number in the form:
   
   * SOLR-####: <short description of problem or changes>
   
   SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
   
   Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
   
   
   # Description
   
   Please provide a short description of the changes you're making with this pull request.
   
   # Solution
   
   Please provide a short description of the approach taken to implement your solution.
   
   # Tests
   
   Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [ ] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [ ] I have created a Jira issue and added the issue ID to my pull request title.
   - [ ] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [ ] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] NazerkeBS commented on a change in pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
NazerkeBS commented on a change in pull request #152:
URL: https://github.com/apache/solr/pull/152#discussion_r643776555



##########
File path: solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java
##########
@@ -42,29 +39,27 @@ public static void setupCluster() throws Exception {
   }
 
   @Test
+  @SuppressWarnings({"unchecked"})
   public void testModifyColl() throws Exception {
 
     final String collName = "modifyColl";
 
     CollectionAdminRequest.createCollection(collName, "conf1", 1, 2)
         .process(cluster.getSolrClient());
 
-    // TODO create a modifyCollection() method on CollectionAdminRequest
-    ModifiableSolrParams p1 = new ModifiableSolrParams();
-    p1.add("collection", collName);
-    p1.add("action", "MODIFYCOLLECTION");
-    p1.add("collection.configName", "conf2");
-    cluster.getSolrClient().request(new GenericSolrRequest(POST, COLLECTIONS_HANDLER_PATH, p1));
+    //Modify configSet
+    RequestStatusState requestStatusState = CollectionAdminRequest.modifyCollection(collName,
+            map("collection.configName", "conf2")
+    ).processAndWait(cluster.getSolrClient(), DEFAULT_TIMEOUT);
+    assertEquals(requestStatusState.getKey(), "completed");

Review comment:
       Yes, it does fail without this fix




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] NazerkeBS commented on pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
NazerkeBS commented on pull request #152:
URL: https://github.com/apache/solr/pull/152#issuecomment-853743587


   Updated the docs as you mentioned. 


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] cpoerschke commented on a change in pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on a change in pull request #152:
URL: https://github.com/apache/solr/pull/152#discussion_r645372210



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -275,6 +275,7 @@ The attributes that can be modified are:
 * replicationFactor
 * collection.configName
 * readOnly
+* async

Review comment:
       #161 proposes to document `async` as parameter instead of the attributes list here.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on a change in pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #152:
URL: https://github.com/apache/solr/pull/152#discussion_r645068458



##########
File path: solr/CHANGES.txt
##########
@@ -312,6 +312,13 @@ Bug Fixes
 
 * SOLR-15334: Return error response when failing auth in PKIAuthPlugin (Mike Drob)
 
+==================  8.10.0 ==================
+
+Bug Fixes
+---------------------
+
+* SOLR-15311: Support ASYNC parameter in MODIFYCOLLECTION (Nazerke Seidan, David Smiley)

Review comment:
       ```suggestion
   * SOLR-15311: Support ASYNC parameter in MODIFYCOLLECTION (Nazerke Seidan, Christine Poerschke, David Smiley)
   * ```




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley merged pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley merged pull request #152:
URL: https://github.com/apache/solr/pull/152


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] NazerkeBS commented on pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
NazerkeBS commented on pull request #152:
URL: https://github.com/apache/solr/pull/152#issuecomment-852262983


   When `processAndWait` is used in `OverseerModifyCollectionTest#testModifyColl` , the test case fails as ASYNC key is added. 
   Instead of adding a new test case, I refactored it.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley commented on pull request #152:
URL: https://github.com/apache/solr/pull/152#issuecomment-853076846


   Can you please add a CHANGES.txt entry?  Please add an 8.10 section.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on a change in pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #152:
URL: https://github.com/apache/solr/pull/152#discussion_r643465722



##########
File path: solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java
##########
@@ -42,29 +39,27 @@ public static void setupCluster() throws Exception {
   }
 
   @Test
+  @SuppressWarnings({"unchecked"})

Review comment:
       We try to avoid writing code in a way that has warnings so that we needn't suppress them.  Sometimes it's not avoidable.  I can tell here that it's because you called `SolrTestCaseJ4.map`.  Let's call Map.of instead.  Or even Collections.singletonMap because we might take this change to 8x and Java 8 doesn't have Map.of.

##########
File path: solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java
##########
@@ -42,29 +39,27 @@ public static void setupCluster() throws Exception {
   }
 
   @Test
+  @SuppressWarnings({"unchecked"})
   public void testModifyColl() throws Exception {
 
     final String collName = "modifyColl";
 
     CollectionAdminRequest.createCollection(collName, "conf1", 1, 2)
         .process(cluster.getSolrClient());
 
-    // TODO create a modifyCollection() method on CollectionAdminRequest
-    ModifiableSolrParams p1 = new ModifiableSolrParams();
-    p1.add("collection", collName);
-    p1.add("action", "MODIFYCOLLECTION");
-    p1.add("collection.configName", "conf2");
-    cluster.getSolrClient().request(new GenericSolrRequest(POST, COLLECTIONS_HANDLER_PATH, p1));
+    //Modify configSet
+    RequestStatusState requestStatusState = CollectionAdminRequest.modifyCollection(collName,
+            map("collection.configName", "conf2")
+    ).processAndWait(cluster.getSolrClient(), DEFAULT_TIMEOUT);
+    assertEquals(requestStatusState.getKey(), "completed");

Review comment:
       RequestStatusState is an enum, and is thus immutable.  Why not just do an instance check?

##########
File path: solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java
##########
@@ -42,29 +39,27 @@ public static void setupCluster() throws Exception {
   }
 
   @Test
+  @SuppressWarnings({"unchecked"})
   public void testModifyColl() throws Exception {
 
     final String collName = "modifyColl";
 
     CollectionAdminRequest.createCollection(collName, "conf1", 1, 2)
         .process(cluster.getSolrClient());
 
-    // TODO create a modifyCollection() method on CollectionAdminRequest
-    ModifiableSolrParams p1 = new ModifiableSolrParams();
-    p1.add("collection", collName);
-    p1.add("action", "MODIFYCOLLECTION");
-    p1.add("collection.configName", "conf2");
-    cluster.getSolrClient().request(new GenericSolrRequest(POST, COLLECTIONS_HANDLER_PATH, p1));
+    //Modify configSet
+    RequestStatusState requestStatusState = CollectionAdminRequest.modifyCollection(collName,
+            map("collection.configName", "conf2")
+    ).processAndWait(cluster.getSolrClient(), DEFAULT_TIMEOUT);
+    assertEquals(requestStatusState.getKey(), "completed");

Review comment:
       And I presume the changes here fail without the underlying fix?




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] NazerkeBS commented on pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
NazerkeBS commented on pull request #152:
URL: https://github.com/apache/solr/pull/152#issuecomment-853743587


   Updated the docs as you mentioned. 


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on a change in pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley commented on a change in pull request #152:
URL: https://github.com/apache/solr/pull/152#discussion_r645068458



##########
File path: solr/CHANGES.txt
##########
@@ -312,6 +312,13 @@ Bug Fixes
 
 * SOLR-15334: Return error response when failing auth in PKIAuthPlugin (Mike Drob)
 
+==================  8.10.0 ==================
+
+Bug Fixes
+---------------------
+
+* SOLR-15311: Support ASYNC parameter in MODIFYCOLLECTION (Nazerke Seidan, David Smiley)

Review comment:
       ```suggestion
   * SOLR-15311: Support ASYNC parameter in MODIFYCOLLECTION (Nazerke Seidan, Christine Poerschke, David Smiley)
   * ```




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] cpoerschke commented on pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on pull request #152:
URL: https://github.com/apache/solr/pull/152#issuecomment-853333462


   Maybe also update the https://solr.apache.org/guide/8_8/collection-management.html#modifycollection to mention the (now supported) `async` parameter.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley merged pull request #152: SOLR-15311: Filter ASYNC key in during collection update

Posted by GitBox <gi...@apache.org>.
dsmiley merged pull request #152:
URL: https://github.com/apache/solr/pull/152


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org