You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jakov Varenina (Jira)" <ji...@apache.org> on 2022/05/26 10:35:00 UTC

[jira] [Assigned] (GEODE-10338) LogWriterAppender keeps a InternalDistributedSystem alive after disconnect

     [ https://issues.apache.org/jira/browse/GEODE-10338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakov Varenina reassigned GEODE-10338:
--------------------------------------

    Assignee: Jakov Varenina

> LogWriterAppender keeps a InternalDistributedSystem alive after disconnect
> --------------------------------------------------------------------------
>
>                 Key: GEODE-10338
>                 URL: https://issues.apache.org/jira/browse/GEODE-10338
>             Project: Geode
>          Issue Type: Bug
>          Components: logging
>            Reporter: Darrel Schneider
>            Assignee: Jakov Varenina
>            Priority: Major
>              Labels: blocks-1.16.0
>
> The LogWriterAppender has a "logWriter" field that can be a ManagerLogWriter. When stopSession is called on the appender, it closes the ManagerLogWriter's files but does not release its reference to it and the LogWriterAppender instance is kept around after disconnect. So this ends up keeping the InternalDistributedSystem alive.
> To fix this change LogWriterAppender.stopSession like so:
> {code:java}
>   public synchronized void stopSession() {
>     LOGGER.info("Stopping session in {}.", this);
>     if (logWriter == null) {
>       // we are probably already paused but make sure we are
>       pause();
>       return;
>     }
>     logWriter.shuttingDown();
>     pause();
>     logWriter.closingLogFile();
>     logWriter = null;
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)