[ 
https://issues.apache.org/jira/browse/GEODE-8119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17125849#comment-17125849
 ] 

ASF GitHub Bot commented on GEODE-8119:
---------------------------------------

jujoramos commented on pull request #5175:
URL: https://github.com/apache/geode/pull/5175#issuecomment-638793177


   @mkevo 
   > In all offline disk-store commands it calls DiskStoreImpl in which is 
startAsyncFlusher which starts these threads. E.g. AlterOfflineDiskStoreCommand 
use modifyRegion which have createForOffline method in which DiskStoreImpl 
constructor is called where it start this thread with startAsyncFlusher.
   
   Agreed, however, you can simply invoke the `DiskStoreImpl.close()` method 
instead of modifying the `DiskStoreCommandsUtils` class, wouldn't that be 
better as it involves less changes?. The `DiskStoreImpl.offlineCompact()` 
method (used by `compact offline-disk-store` command), as an example, already 
does that:
   
   ```
     public static DiskStoreImpl offlineCompact(String name, File[] dirs, 
boolean upgradeVersionOnly,
         long maxOplogSize) throws Exception {
       try {
         DiskStoreImpl dsi =
             createForOffline(name, dirs, true, false, upgradeVersionOnly, 
maxOplogSize, true, false);
         dsi.offlineCompact();
         dsi.close();
         return dsi;
       } finally {
         cleanupOffline();
       }
     }
   ```
   
   ---
   
   As a side note, I believe some more tests should be added to the `PR` in 
order to get approval.
   The ticket specifies that some threads (the `flusherThread` specifically) 
are not properly closed after invoking offline `disk-store` commands, but no 
tests were added to exhibit the bug itself, so nothing can be used to prove the 
problem is fixed after applying the changes.
   


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


> Threads are not properly closed when offline disk-store commands are invoked
> ----------------------------------------------------------------------------
>
>                 Key: GEODE-8119
>                 URL: https://issues.apache.org/jira/browse/GEODE-8119
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Mario Kevo
>            Assignee: Mario Kevo
>            Priority: Major
>
> Threads can be opened when you are online and offline, but close only when 
> you are online. Once some offline command started thread it cannot be closed 
> and after some time if there is a bigger number of this threads it can lead 
> to OOM exception.
> Also the problem is that its validating only disk-dirs but not diskStore 
> name. So thread can be created but there is no diskStore with that name and 
> it will also hang.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to