Das Problem scheint nicht behoben zu sein.
Aus dem fc-dev-service Log von 2023-03-29T01:40:55.359Z:
java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.jobrunr.server.runner.AbstractBackgroundJobRunner.invokeJobMethod(AbstractBackgroundJobRunner.java:65) at org.jobrunr.server.runner.AbstractBackgroundJobRunner.run(AbstractBackgroundJobRunner.java:39) at org.jobrunr.server.runner.AbstractBackgroundJobRunner.run(AbstractBackgroundJobRunner.java:21) at org.jobrunr.server.BackgroundJobPerformer.runActualJob(BackgroundJobPerformer.java:83) at org.jobrunr.server.BackgroundJobPerformer.run(BackgroundJobPerformer.java:43) at java.base/java.util.concurrent.Executors.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)Caused by: java.lang.OutOfMemoryError: Java heap space at java.base/java.util.Arrays.copyOf(Arrays.java:3745) at java.base/java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:120) at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95) at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:156) at org.hibernate.type.descriptor.java.DataHelper.extractBytes(DataHelper.java:170) at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:120) at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:26) at org.hibernate.type.descriptor.sql.BlobTypeDescriptor.doExtract(BlobTypeDescriptor.java:48) at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3214) at org.hibernate.persister.entity.Loadable.hydrate(Loadable.java:94) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:342) at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:269) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:80) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractRows(ResultSetProcessorImpl.java:157) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:94) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:105) at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:87) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:705) at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:76) at org.hibernate.internal.SessionImpl21143Lambda/0x0000000840cb5840.accept(Unknown Source) at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2208) at org.hibernate.collection.internal.AbstractPersistentCollection.doWork(AbstractPersistentCollection.java:595) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:264) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:591) at org.hibernate.collection.internal.PersistentSet.clear(PersistentSet.java:316) at de.fiep.zustelldienst.model.submission.Submission.deleteAttachments(Submission.java:164)
Ich würde heute den entsprechenden Merge-Request stellen. Damit würde es morgen auf dev/test landen (@Maik_Boettner).
Genaue Fehleranalyse bzw. Erklärung warum es zu diesem Problem kam folgt dann wahrscheinlich morgen Vormittag.
Basierend auf dem folgenden Logauszug lässt sich erkennen, dass Hibernate beim Löschen zuerst alles einliest, weiteren Code ausführt und erst irgendwann später die Attachments echt löscht. Das Einlesen findet aber bereits direkt beim Ausführen von .clear() aus.
Hibernate: select attachment0_.fk_submission as fk_submi5_0_0_, attachment0_.id as id1_0_0_, attachment0_.id as id1_0_1_, attachment0_.attachment_id as attachme2_0_1_, attachment0_.content as content3_0_1_, attachment0_.content_size as content_4_0_1_, attachment0_.fk_submission as fk_submi5_0_1_ from attachment attachment0_ where attachment0_.fk_submission=?
Hibernate: select announceda0_.submission_id as submissi1_11_0_, announceda0_.announced_attachment as announce2_11_0_ from submission_announced_attachments announceda0_ where announceda0_.submission_id=?
Hibernate: select nextval ('event_log_id_seq')
Hibernate: insert into event_log (event, fk_submission, token, token_id, id) values (?, ?, ?, ?, ?)
Hibernate: update submission set callback_id=?, case_id=?, current_status=?, destination_id=?, encrypted_data=?, encrypted_metadata=?, service_type_id=?, state_changed_at=? where id=?
Hibernate: update event_log set event=?, fk_submission=?, token=?, token_id=? where id=?
Hibernate: delete from submission_announced_attachments where submission_id=?
Hibernate: delete from attachment where id=?
Hibernate: delete from attachment where id=?
Neue Version des Zustelldienstes wurde auf dev deployed. Zusätzlich wurde auf Anraten von @Andreas_Huber der Cron Job für den Löschvorgang vorverlegt. Dieser sollte heute um 15:01 Uhr laufen.
Wenn alles hinhaut, kann anschließend auf test deployed werden.