Skip to content

Fixing supersededBy issue for SHARED partition

Abhishek Kumar (SLB) requested to merge superseded-defect-slb into master

There is a defect in the Azure module of AzureSchemaInfoStore.java.

Steps to replicate:

  1. Create a schema with a schema with SHARED data-partition with supersededBy block.
  2. Now, invoke schema GET endpoint with appropriate filters: authority, source, entityType and schemaVersionMajor using PRIVATE partition. This call would fail because the search for supersededBy block happens in the PRIVATE partition where it doesn't exist.

Root Cause

Below code make a call to getSchemaInfoObject(info.getFlattenedSchemaInfo()) without passing the dataPartitionID and it always looks for supersededBy block in the datapartition specified in the header (in this case PRIVATE where it doesn't exist):

List<SchemaInfo> schemaList = new LinkedList<>();
for (SchemaInfoDoc info: schemaInfoList)
{
schemaList.add(getSchemaInfoObject(info.getFlattenedSchemaInfo()));
}

FIX

Additional attribute i.e dataPartitionId should be supplied which will look for supersededBy block in the correct dataPartition always.

Issue

#48 (closed)

Edited by Abhishek Kumar (SLB)

Merge request reports