[ 
https://issues.apache.org/jira/browse/ARTEMIS-5675?focusedWorklogId=984015&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-984015
 ]

ASF GitHub Bot logged work on ARTEMIS-5675:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Sep/25 16:52
            Start Date: 22/Sep/25 16:52
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on code in PR #5934:
URL: https://github.com/apache/activemq-artemis/pull/5934#discussion_r2369407994


##########
artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java:
##########
@@ -2880,8 +2883,12 @@ public synchronized void stop() throws Exception {
 
          fileFactory.deactivateBuffer();
 
-         if (currentFile != null && currentFile.getFile().isOpen()) {
-            currentFile.getFile().close(true, true);
+         try {
+            if (currentFile != null && currentFile.getFile().isOpen()) {
+               currentFile.getFile().close(true, true);
+            }
+         } catch (Exception e) {
+            logger.warn(e.getMessage(), e);

Review Comment:
   Ditto.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 984015)
    Time Spent: 0.5h  (was: 20m)

> Server's JVM won't halt when storage is disconnected
> ----------------------------------------------------
>
>                 Key: ARTEMIS-5675
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5675
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.42.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.43.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I tested this by inserting an USB stick, mounting the journal to the folder 
> and disconnecting it.
> At the critical exception, the server will shutdown, however the file.close 
> from the journal will throw an exception and not allow some of the thread 
> dumps to close.
> I have fixed this, by manually testing it. I have no idea on how I could 
> write an automated test for this. (I could of course throw mock tests, but 
> they will not be reliable as I have no idea what errors could happen, I know 
> the current ones but not future issues, so a mock test is not effective IMO).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to