quantranhong1999 commented on code in PR #1925:
URL: https://github.com/apache/james-project/pull/1925#discussion_r1458252370


##########
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:
   > I think GC is a backup method for the case blob is not deleted in 
DeleteMessageListener. We still should delete blobs immediately
   
   Are you sure we should do that? Any chance the attachment is still being 
referenced somewhere else?
   
   e.g. DeduplicationBlobStore, where the same attachments would share the same 
object in the blob store.



-- 
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]

Reply via email to