[
https://issues.apache.org/jira/browse/GEODE-7875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17552064#comment-17552064
]
ASF subversion and git services commented on GEODE-7875:
--------------------------------------------------------
Commit 9f2ba7b9d6976adcf28383c566c9f80af67219e3 in geode's branch
refs/heads/develop from Mario Kevo
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=9f2ba7b9d6 ]
GEODE-7875: fix create index gfsh command on partitioned region (#7629)
* GEODE-7875: fix create index gfsh command on partitioned region
> The gfsh create index command sometimes fails with 'Index already exists.
> Create failed due to duplicate name.' message
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-7875
> URL: https://issues.apache.org/jira/browse/GEODE-7875
> Project: Geode
> Issue Type: Bug
> Components: gfsh, querying
> Reporter: Barrett Oglesby
> Assignee: Mario Kevo
> Priority: Major
> Labels: pull-request-available
>
> Here is output from the connect, list indexes, create index commands:
> {noformat}
> (1) Executing - connect --locator=localhost[23456]
> Connecting to Locator at [host=localhost, port=23456] ..
> Connecting to Manager at [host=boglesbymac.local, port=1099] ..
> Successfully connected to: [host=boglesbymac.local, port=1099]
> (2) Executing - list indexes
> No Indexes Found
> (3) Executing - create index --name=cusip_index_1 --expression=cusip
> --region=/Trades
> Member | Status | Message
> ------------------------------------ | ------ |
> ---------------------------------------------------------------------------
> 192.168.1.4(server1:88452)<v1>:41001 | ERROR | Index "cusip_index_1" already
> exists. Create failed due to duplicate name.
> 192.168.1.4(server2:88465)<v2>:41002 | OK | Index successfully created
> 192.168.1.4(server3:88473)<v3>:41003 | ERROR | Index "cusip_index_1" already
> exists. Create failed due to duplicate name.
> 192.168.1.4(server4:88480)<v4>:41004 | ERROR | Index "cusip_index_1" already
> exists. Create failed due to duplicate name.
> {noformat}
> Here is some logging that shows the behavior:
> server2 executes the CreateIndexFunction and creates the index locally:
> {noformat}
> [warn 2020/03/12 16:18:11.273 PDT <Function Execution Processor2> tid=0x54]
> XXX CreateIndexFunction.execute indexName=cusip_index_1
> [info 2020/03/12 16:18:11.297 PDT <Function Execution Processor2> tid=0x54]
> Created index locally, sending index creation message to all members, and
> will be waiting for response Index [ Name=cusip_index_1 Type =FUNCTIONAL
> IdxExp=cusip From=/Trades Proj=*]imports : null.
> {noformat}
> It sends the IndexCreationMsg to servers 1, 3 and 4 and processes the
> response:
> {noformat}
> [warn 2020/03/12 16:18:11.297 PDT <Function Execution Processor2> tid=0x54]
> XXX IndexCreationMsg.send indMsg=cusip_index_1
> [warn 2020/03/12 16:18:11.298 PDT <Function Execution Processor2> tid=0x54]
> XXX PartitionedRegion.createIndex
> response=<IndexCreationMsg$IndexCreationResponse 52 waiting for 3 replies
> from [192.168.1.4(server1:88452)<v1>:41001,
> 192.168.1.4(server3:88473)<v3>:41003, 192.168.1.4(server4:88480)<v4>:41004]>
> {noformat}
> servers 1, 3 and 4 receive the IndexCreationMsg, creates the index and
> respond:
> {noformat}
> [warn 2020/03/12 16:18:11.298 PDT <PartitionedRegion Message Processor2>
> tid=0x4b] XXX IndexCreationMsg.operateOnPartitionedRegion about to
> createIndexes
> [warn 2020/03/12 16:18:11.304 PDT <PartitionedRegion Message Processor2>
> tid=0x4b] XXX IndexCreationMsg.operateOnPartitionedRegion done createIndexes
> {noformat}
> Then they execute the CreateIndexFunction to create the index locally which
> fails:
> {noformat}
> [warn 2020/03/12 16:18:11.501 PDT <Function Execution Processor2> tid=0x4e]
> XXX CreateIndexFunction.execute indexName=cusip_index_1
> [warn 2020/03/12 16:18:11.521 PDT <Function Execution Processor2> tid=0x4e]
> XXX CreateIndexFunction.execute failed due to IndexNameConflictException:
> org.apache.geode.cache.query.IndexNameConflictException: Index named '
> cusip_index_1 ' already exists.
> at
> org.apache.geode.internal.cache.PartitionedRegion.createIndex(PartitionedRegion.java:8453)
> at
> org.apache.geode.internal.cache.PartitionedRegion.createIndex(PartitionedRegion.java:8403)
> at
> org.apache.geode.cache.query.internal.DefaultQueryService.createIndex(DefaultQueryService.java:245)
> at
> org.apache.geode.cache.query.internal.DefaultQueryService.createIndex(DefaultQueryService.java:203)
> at
> org.apache.geode.cache.query.internal.DefaultQueryService.createIndex(DefaultQueryService.java:274)
> at
> org.apache.geode.cache.query.internal.DefaultQueryService.createIndex(DefaultQueryService.java:177)
> at
> org.apache.geode.management.internal.cli.functions.CreateIndexFunction.execute(CreateIndexFunction.java:62)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)