chibenwa commented on a change in pull request #474: URL: https://github.com/apache/james-project/pull/474#discussion_r647361528
########## File path: server/blob/blob-cassandra/src/main/java/org/apache/james/blob/cassandra/cache/CachedBlobStore.java ########## @@ -138,17 +138,19 @@ public InputStream read(BucketName bucketName, BlobId blobId, StoragePolicy stor if (storagePolicy == LOW_COST) { return backend.read(bucketName, blobId); } - return Mono.just(bucketName) - .filter(getDefaultBucketName()::equals) - .flatMap(defaultBucket -> readInDefaultBucket(bucketName, blobId)) - .switchIfEmpty(readFromBackend(bucketName, blobId)) + if (bucketName.equals(getDefaultBucketName())) { Review comment: Well as a rule of thumb simplifying the reactor execution lead to less big call stacks, and less runtime steps. IMO we should refrain from pushing unneeded complexity to reactor. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org