From f0476d6a12b68d63a49779c7bfcaaf2e336c0bb2 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 27 May 2021 08:50:53 -0400 Subject: [PATCH] ARTEMIS-3318/ARTEMIS-2931 Fixing potential issue The issue here is not supposed to happen, however I'm changing the return here to true and logging the warn properly --- .../activemq/artemis/core/paging/impl/PagingStoreImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java index f84c347223..f7e0186fc3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java @@ -573,8 +573,10 @@ public class PagingStoreImpl implements PagingStore { SequentialFile file = factory.createSequentialFile(fileName); return file.exists() && file.size() > 0; } catch (Exception ignored) { - logger.debug("PagingStoreFactory::checkPageFileExists never-throws assumption failed.", ignored); - return false; + // never supposed to happen, but just in case + logger.warn("PagingStoreFactory::checkPageFileExists never-throws assumption failed.", ignored); + return true; // returning false would make the acks to the page to go missing. + // since we are not sure on the result for this case, we just return true } }