Use a dedicated hazelcast queue as the listener to generate index task
Currently the index task generator listens to the events from the systemmetadata map. But the events from the system metadata map can come from different scenarios. For example, when tomcat starts up, hazelcast will load the system metadata from the database into the systemmetadata map. If the index generator is running, it can generate lots of index tasks which we really don't need.
If we have a dedicate queue, we can avoid this scenario. But we should call a method to put the system metadata into the queue specifically during the synchronization.
#3 Updated by Rob Nahf almost 7 years ago
The current operational structure (sync on UCSB and index on ORC) doesn't allow us to have sync generate index tasks in the local postgres DB.
In an orderly start, the index generator is started after tomcat (owner of HZ system metadata map), but tomcat restarts, and maybe even network partitioning issues might lead to a the index generator hearing a lot of spurious map add events.
Gaining this independence might be accomplished by creating a Hazelcast "SystemMetadataUpdated" list/set or map that is only added to by synchronization and the API update methods The indexTaskGenerator would be listening to this data structure on ORC. Not sure if it solves the network partitioning issue.