gemmellr commented on code in PR #5498:
URL: https://github.com/apache/activemq-artemis/pull/5498#discussion_r1967924285


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java:
##########
@@ -731,17 +800,21 @@ private void resetCurrentPage(Page newCurrentPage) {
    @Override
    public void stopPaging() {
       logger.debug("stopPaging being called, while isPaging={} on {}", 
this.paging, this.storeName);
-      lock.writeLock().lock();
+      writeLock();
       try {
          final boolean isPaging = this.paging;
          if (isPaging) {
+            if (timedWriter.hasPendingIO()) {
+               logger.debug("There are pending timed writes. Cannot clear 
paging now.");

Review Comment:
   I know thats what it meant, but I dont get why its allowed. It rather 
boggles my mind that 'stopPaging' is allowed to silently not-stop-paging. E.g 
dePage calls the stopPaging method right before it is deleting files. It cant 
tell what happens. Is the delete safe if paging wasnt actually stopped?



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to