Closed slominskir closed 1 month ago
We should consider dropping the alarmId primary key and it's associated foreign key and instead use the name column (currently an alternate key) as the primary key and no longer include a foreign key at all. This would be one less operation (the lookup). This could also solve the issue of unregistered alarms: https://github.com/JeffersonLab/jaws-admin-gui/issues/37 (by allowing the notifications to be stored anyways).
After booting up the app the list of notifications takes another minute to populate the Oracle cache and therefore the Active tab reading directly from Kafka is up-to-date while the Notifications tab (Oracle cache) is out-of-sync as it loads. This is probably due to the high cost of querying each alarm name and then inserting each record one-by-one. This should be improved to insert in bulk:
https://github.com/JeffersonLab/jaws-admin-gui/blob/182915b2b87efb0532fdce83762ff9fe6f031cdc/src/main/java/org/jlab/jaws/business/session/KafkaNotificationFacade.java#L57-L67