You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/05/19 10:41:54 UTC

[GitHub] [geode] mkevo commented on a diff in pull request #7629: GEODE-7875: fix create index gfsh command on partitioned region

mkevo commented on code in PR #7629:
URL: https://github.com/apache/geode/pull/7629#discussion_r876900607


##########
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/commands/IndexCommandsIntegrationTestBase.java:
##########
@@ -136,7 +136,9 @@ public void testCannotCreateIndexWithExistingIndexName() throws Exception {
     csb.addOption(CliStrings.CREATE_INDEX__REGION, SEPARATOR + regionName);
     csb.addOption(CliStrings.CREATE_INDEX__TYPE, "hash");
 
-    gfsh.executeAndAssertThat(csb.toString()).statusIsError();
+    gfsh.executeAndAssertThat(csb.toString())
+        .statusIsSuccess()

Review Comment:
   As we agreed in the above comments, using Status.IGNORABLE for some type of the exceptions will solve the problem, the user will get the correct output, that index is successfully created on all members, and the status command is a success.
   In the output, if an exception occurs it will print in the status section of the command output IGNORED. Why is this ok?
   The index will be created on that servers too, but the create request comes from other servers, and if the request from the locator(from the command) comes later it will say that the index already exists and the command will be a success(before this change the command failed, but index created on all members and cluster config is not updated).
   Another thing is when the user runs the create index command multiple times, the command will be successful, but in the printout, the user will see that the index already exists in members, and the status is IGNORED.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org