vttranlina commented on code in PR #1925:
URL: https://github.com/apache/james-project/pull/1925#discussion_r1458249388
##########
mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/DeleteMessageListener.java:
##########
@@ -146,4 +153,8 @@ private Mono<Boolean> isUnreferenced(PostgresMessageId id,
PostgresMailboxMessag
.map(count -> true)
.defaultIfEmpty(false);
}
+
+ private Mono<Void> deleteAttachment(PostgresMessageId messageId,
PostgresAttachmentDAO attachmentDAO) {
+ return attachmentDAO.deleteByMessageId(messageId);
Review Comment:
IMO. It is not clear "backup" or not. In another view, the listener is
async, it is not "immediately", I can also question for similar cases why we
don't delete instantly every reference for every delete event? Why do we tend
to have cleanUp tasks in Task Manager?
It 50-50. I will add delete blob as you want, anyway it's simple
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]