You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2022/08/18 02:01:34 UTC

[james-project] branch 3.7.x updated (b0bfab4822 -> a3ce06fa19)

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

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


    from b0bfab4822 [3.7.x] Update docker-compose sample - Remove entrypoint
     new 3c9c2b3e1f JAMES-3800 S3BlobStoreDAO should be explicit upon future cancellation
     new a3ce06fa19 JAMES-3801 Nack errors upon dequeue

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java    | 3 ++-
 .../src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java    | 7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 02/02: JAMES-3801 Nack errors upon dequeue

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a3ce06fa198fbe4066f29195135ba8c231bed88d
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Aug 10 11:05:21 2022 +0700

    JAMES-3801 Nack errors upon dequeue
    
    (cherry picked from commit 574196b1b10cd177497cc221110edd148e924a96)
---
 .../src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java
index dfd784718d..92c549d23a 100644
--- a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java
+++ b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/Dequeuer.java
@@ -120,7 +120,12 @@ class Dequeuer {
 
     private Mono<RabbitMQMailQueueItem> loadItem(AcknowledgableDelivery response) {
         return loadMail(response)
-            .map(mailWithEnqueueId -> new RabbitMQMailQueueItem(ack(response, mailWithEnqueueId), mailWithEnqueueId));
+            .map(mailWithEnqueueId -> new RabbitMQMailQueueItem(ack(response, mailWithEnqueueId), mailWithEnqueueId))
+            .onErrorResume(e -> {
+                LOGGER.error("Failed to load email, requeue corresponding message", e);
+                response.nack(REQUEUE);
+                return Mono.empty();
+            });
     }
 
     private ThrowingConsumer<Boolean> ack(AcknowledgableDelivery response, MailWithEnqueueId mailWithEnqueueId) {


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[james-project] 01/02: JAMES-3800 S3BlobStoreDAO should be explicit upon future cancellation

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3c9c2b3e1f437c80b4ccf1f0b575b24a5960810c
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Aug 10 10:26:05 2022 +0700

    JAMES-3800 S3BlobStoreDAO should be explicit upon future cancellation
    
    Previously returned an empty publisher, causing data
     validation issues down the line.
    
     Cause of this error is a XML unmarshalling issue upon
     timeouts upon partial data receival.
    
     This error handling will make James error logs less cryptic and hopefully easier to audit.
    
    (cherry picked from commit 08f30ae5c1663cb273b826771c9b2240410c15d6)
---
 .../java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
index 66097a93fc..190639f654 100644
--- a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
+++ b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
@@ -202,7 +202,8 @@ public class S3BlobStoreDAO implements BlobStoreDAO, Startable, Closeable {
                         response.flux = Flux.from(publisher);
                         response.supportingCompletableFuture.complete(response);
                     }
-                }));
+                }))
+            .switchIfEmpty(Mono.error(() -> new ObjectStoreIOException("Request was unexpectedly canceled, no GetObjectResponse")));
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org