SpaceTypeDescriptorBuilder fails when explicitly indexing the routing key using deprecated values

Description

The following code is valid for version 12.1 & 12.1.1 but fails with 12.3

SpaceTypeDescriptorBuilder builder = new SpaceTypeDescriptorBuilder("someType");
builder.addIndex(SpaceIndexFactory.createPropertyIndex("property", SpaceIndexType.BASIC)); // SpaceIndexType.EQUAL also fails
builder.routingProperty("property");

Failure message: java.lang.IllegalArgumentException: Cannot add index 'aggregateId' - an index with the same name is already defined.
Test and stack trace are attached.

Investigation:
In 12.3 when Routing is defined in addition to SpaceId it does not need to be indexed specifically. It's already indexed with EQUAL by default.
Removing this line:
builder.addIndex(SpaceIndexFactory.createPropertyIndex("property", SpaceIndexType.BASIC));
will solve the issue but the customer insist to have backward compatibility.

Workaround

Removing this line:
builder.addIndex(SpaceIndexFactory.createPropertyIndex("property", SpaceIndexType.BASIC));

Acceptance Test

com.gigaspaces.metadata.SpaceTypeDescriptorTestCase#testExplicitRoutingIndex()

Status

Assignee

Niv Ingberg

Reporter

Yuval Dori

Labels

None

Priority

Medium

SalesForce Case ID

00011816

Fix versions

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Open Source

Platform

All
Configure