This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit d641a516d2e9bdc60596d5ebcac3004618521696
Author: Quan Tran <[email protected]>
AuthorDate: Wed Apr 15 10:27:28 2026 +0700

    JAMES-4182 Fix a blocking call in 
CassandraAttachmentMapper::loadAttachmentContent
    
    Made the attachment test failed.
---
 .../apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
index 07c0b1363e..23c1205b64 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraAttachmentMapper.java
@@ -92,7 +92,7 @@ public class CassandraAttachmentMapper implements 
AttachmentMapper {
     @Override
     public InputStream loadAttachmentContent(AttachmentId attachmentId) throws 
AttachmentNotFoundException {
         return attachmentDAOV2.getAttachment(attachmentId)
-            .map(daoAttachment -> 
blobStore.read(blobStore.getDefaultBucketName(), daoAttachment.getBlobId(), 
LOW_COST))
+            .flatMap(daoAttachment -> 
Mono.from(blobStore.readReactive(blobStore.getDefaultBucketName(), 
daoAttachment.getBlobId(), LOW_COST)))
             .blockOptional()
             .orElseThrow(() -> new 
AttachmentNotFoundException(attachmentId.toString()));
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to