Commit d70d2be3 authored by Matija Obreza's avatar Matija Obreza
Browse files

Firehose: Fixed JPA listener for deleteAll(..)

parent 6f26e70c
......@@ -67,6 +67,7 @@ public class FirehoseJPAListener implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
includedClasses = Set.copyOf(includedClasses); // make it immutable
LOG.warn("Listening for commits on: {}", includedClasses);
}
public void setIncludedClasses(Set<Class<?>> includedClasses) {
......@@ -169,7 +170,7 @@ public class FirehoseJPAListener implements InitializingBean {
Date timestamp = new Date();
if (toRemove instanceof Iterable<?>) {
if (isIncluded((Iterable<?>) toRemove)) {
if (isIncludedIterable((Iterable<?>) toRemove)) {
LOG.debug("JPA afterRemove: {} {}", joinPoint.toLongString(), joinPoint.getTarget());
List<FirehoseEvent> firehoseEventList = createFirehoseEvents((Iterable<?>) toRemove, timestamp, EventType.DELETE);
// send events!
......
......@@ -826,7 +826,7 @@ public class AccessionUploader implements InitializingBean {
LOG.debug("Processed incoming JSON for {} accessions in {}ms", identifiers.size(), stopWatch.getTime());
List<Accession> existingAccessions = accessionRepository.find(! institute.hasUniqueAcceNumbs(), toBeDeleted);
LOG.debug("Have {} accessions for update and {} exist in {}ms", toBeDeleted.size(), existingAccessions.size(), stopWatch.getTime());
LOG.debug("Have {} accessions for removal and {} exist in {}ms", toBeDeleted.size(), existingAccessions.size(), stopWatch.getTime());
for (Accession deletion: toBeDeleted) {
AccessionOpResponse response;
......
......@@ -32,8 +32,9 @@
<Logger name="org.apache.tomcat.jdbc.pool" level="debug" />
<Logger name="org.hibernate.engine.jdbc" level="fatal" />
<Logger name="org.genesys2.server.component.elastic" level="debug" />
<Logger name="org.genesys2.server.component.firehose" level="debug" />
<!-- <Logger name="org.genesys2.server.component.elastic" level="debug" /> -->
<!-- <Logger name="org.genesys2.server.component.firehose" level="trace" /> -->
<!-- <Logger name="org.genesys2.server.service.worker" level="debug" /> -->
<Root level="error">
<AppenderRef ref="console" />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment