jinmeiliao commented on PR #7629:
URL: https://github.com/apache/geode/pull/7629#issuecomment-1116907135

   i like the idea of fixing this command for partition regions. The problem 
does exist that for partition region, the index creation is distributed to all 
the other servers, so subsequent `CreateIndexFunction` might get name conflict 
error. We can solve this by either of the two ways:
   1) In the `CreateIndexCommand`, if user is creating the index on a partition 
region, only send the function to one member, not all members. Use 
`GfshCommand.findAnyMembersForRegion` method to get just one member to execute 
the function.
   2) In the `CreateIndexFunction`,  when we get a `NameConflictException` or 
`IndexExistsException`, make the `CliFunctionResult` with a 
`StatusState.IGNORABLE`, this will make the command not consider this as a 
failure.
   
   Either of these two approaches should work.


-- 
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-unsubscr...@geode.apache.org

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

Reply via email to