[
https://issues.apache.org/jira/browse/GEODE-8063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101231#comment-17101231
]
ASF GitHub Bot commented on GEODE-8063:
---------------------------------------
pdxcodemonkey commented on a change in pull request #597:
URL: https://github.com/apache/geode-native/pull/597#discussion_r421125677
##########
File path: cppcache/src/CacheImpl.cpp
##########
@@ -640,13 +640,16 @@ void CacheImpl::readyForEvents() {
}
}
-bool CacheImpl::isPoolInMultiuserMode(std::shared_ptr<Region> regionPtr) {
- const auto& poolName = regionPtr->getAttributes().getPoolName();
+bool CacheImpl::isPoolInMultiuserMode(std::shared_ptr<Region> region) {
+ const auto& poolName = region->getAttributes().getPoolName();
if (!poolName.empty()) {
- auto poolPtr = regionPtr->getCache().getPoolManager().find(poolName);
- if (poolPtr != nullptr && !poolPtr->isDestroyed()) {
- return poolPtr->getMultiuserAuthentication();
+ auto pool = static_cast<RegionInternal&>(*region)
+ .getCacheImpl()
+ ->getPoolManager()
+ .find(poolName);
+ if (pool && !pool->isDestroyed()) {
+ return pool->getMultiuserAuthentication();
Review comment:
Also is there a reasonable way to write a test to force this race
condition or something?
----------------------------------------------------------------
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:
[email protected]
> Access violation during Cache destrucition caused by ClientMetadataService
> --------------------------------------------------------------------------
>
> Key: GEODE-8063
> URL: https://issues.apache.org/jira/browse/GEODE-8063
> Project: Geode
> Issue Type: Bug
> Components: native client
> Reporter: Jacob Barrett
> Assignee: Jacob Barrett
> Priority: Major
>
> During the destruction of {{Cache}} the pointer to {{CacheImpl}} is invalid.
> Calls from {{ClientMetadataService}} attempt to access {{Pool}} instances
> through the {{Cache}} instance rather than {{CacheImpl}} resulting in access
> violation. This issue is timing dependent and isn't always reproducible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)