Fixing concurrency issues with getIndexMappingFromRecordSchema()

test case demonstrating a thread-unsafe operation of IndexerMappingServiceImpl.getIndexMappingFromRecordSchema(..) and also the fix for it.

When concurrent indexing requests for kinds whose index hasn't been created yet arrive, There are concurrent calls to getIndexMappingFromRecordSchema. There is a threading issue in - It gives the same objects to multiple threads, which result in the objects being corrupted with another object's value. This PR fixes the problem by ensuring every function call to the TypeMapper methods return new objects and not static pre-created objects.

Edited by Sabarish K R E

Merge request reports