Duplicate schemas are getting created into the system
Summary
Schemas with same kind are getting created into different partitions.
Steps to reproduce
- Create a schema using POST endpoint into shared partition
- Create schema using same kind but using some other data-partition
- Use search end-point using private partition, it would return two records with same id but different scope.\
- Get schema by id endpoint would return different schemas depending upon which partition is being used in the header.
Example Project
15534c8a (comment 77916) 15534c8a (comment 77917)
What is the current bug behavior?
The error is given if user tries to create a schema with a pre-existing kind.
What is the expected correct behavior?
The error should be given : Schema already exist.
Relevant logs and/or screenshots
Possible fixes
Should check the presence of the schema-id in all the partitions before creating a new one.
/cc @project-manager