linagora / james-project

Mirror of Apache James Project
Apache License 2.0
72 stars 62 forks source link

java.lang.IllegalArgumentException: 'size' is required to be a strictly positive number #5252

Closed chibenwa closed 3 months ago

chibenwa commented 3 months ago
java.lang.IllegalArgumentException: 'size' is required to be a strictly positive number
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)
    at org.apache.james.vault.DeletedMessage.<init>(DeletedMessage.java:175)
    at org.apache.james.vault.DeletedMessage$Builder$FinalStage.build(DeletedMessage.java:150)
    at org.apache.james.vault.metadata.DeletedMessageVaultDeletionCallback.lambda$forMessage$2(DeletedMessageVaultDeletionCallback.java:89)
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:132)
    at reactor.core.publisher.MonoUsing$MonoUsingSubscriber.onNext(MonoUsing.java:231)
    at reactor.core.publisher.MonoUsing$MonoUsingSubscriber.onNext(MonoUsing.java:231)
    at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
    at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
    at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

0 byte mnessages do happen in prod. oups.

admin@cqlsh:cnb_prd_tmail> select fullcontentoctets from messageidtable WHERE mailboxid = 33ffdde0-4e88-11ef-a191-57867848886b;

 fullcontentoctets
-------------------
                 0
             93449
             89585
            143591

DOD: accept 0 byte message;

Arsnael commented 3 months ago

Ok to relax the strict positive condition, but just wondering how can the size of a message be possibly 0 though?

chibenwa commented 3 months ago

I bet a result of APPEND command

quantranhong1999 commented 3 months ago

https://github.com/apache/james-project/pull/2392