Changing the logic in the retrieveDataContainer() method is working as the providers are not initialized simultaneously (multi-threaded), tested it with the UCSC provider. Also, while doing this change, found out that the data providers are not initializing based on the load priority but based on the order in the igbDefaultPrefs.json file. We can change this behavior by sorting the dataProviders list after retrieving them from the json based on the load priority. Below are the custom print messages which I have added to check this.
===================Current thread: AWT-EventQueue-0 Provider: RNA-Seq Priority: 0====================
===================Current thread: AWT-EventQueue-0 Provider: IGB Quickload Priority: 2====================
===================Current thread: AWT-EventQueue-0 Provider: Blueberry Priority: 3====================
===================Current thread: AWT-EventQueue-0 Provider: UCSC REST Priority: 6====================
===================Current thread: AWT-EventQueue-0 Provider: Bio-Analytic Resource Priority: 1====================
===================Current thread: AWT-EventQueue-0 Provider: ChIP-Seq Priority: 1====================
===================Current thread: AWT-EventQueue-0 Provider: Genome in a Bottle Priority: 1====================
Nowlan Freese - Could you please look into this and let me know if I need to change the logic to load them based on the load priority.
Investigated the code and found the class and method that is responsible for this logic, the method retrieveDataContainer() inside GeneralLoadUtils is responsible for the addition of species to the species list. This method is called for each data provider from the loadSupportedGenomeVersions() method in the DataProviderManager class. We can change the logic in the retrieveDataContainer() method to check whether the species that is being loaded by the Ensembl provider is already present in the species list but have to check whether this method is called by all the data providers simultaneously (multi-threaded) or we can change the logic after all the species are loaded.