[
https://issues.apache.org/jira/browse/GEODE-3299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16218827#comment-16218827
]
ASF GitHub Bot commented on GEODE-3299:
---------------------------------------
pdxrunner commented on a change in pull request #975: GEODE-3299: throw
CacheClosedException in FunctionContext.getCache()
URL: https://github.com/apache/geode/pull/975#discussion_r146884659
##########
File path:
geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ShowMissingDiskStoresFunction.java
##########
@@ -65,23 +65,25 @@ public void execute(FunctionContext context) {
}
}
}
+ } catch (CacheClosedException ignored) {
Review comment:
My original thought was to preserve the original result, i.e. return an
empty result if the cache is null. However, you're right, we already have a
mechanism to handle unexpected exceptions so I've removed the extra catch
clause.
Test was adjusted accordingly. I've also removed redundant fail() assertions
from the tests since use of fail() does not follow our testing best practices.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Gfsh functions should acquire Cache from FunctionContext
> --------------------------------------------------------
>
> Key: GEODE-3299
> URL: https://issues.apache.org/jira/browse/GEODE-3299
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Reporter: Kirk Lund
> Assignee: Kenneth Howe
> Fix For: 1.4.0
>
>
> Gfsh functions in geode-core
> org.apache.geode.management.internal.cli.functions currently acquire a
> reference to the Cache in several ways including from a singleton in
> CacheFactory which is prone to deadlocking. They should be modified to
> uniformly acquire the Cache from FunctionContext instead.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)