You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2015/12/28 23:36:49 UTC
[jira] [Created] (GEODE-716) Race in
AttributesMutator.setCacheLoader on partitioned regions can result in
buckets without a loaded
Dan Smith created GEODE-716:
-------------------------------
Summary: Race in AttributesMutator.setCacheLoader on partitioned regions can result in buckets without a loaded
Key: GEODE-716
URL: https://issues.apache.org/jira/browse/GEODE-716
Project: Geode
Issue Type: Bug
Reporter: Dan Smith
AttributesMutator.setCacheLoader ends up invoking this code in PartitionedRegionDataStore.cacheLoaderChanged.
{code}
visitBuckets(new BucketVisitor() {
@Override
public void visit(Integer bucketId, Region r) {
AttributesMutator mut = r.getAttributesMutator();
if (logger.isDebugEnabled()) {
logger.debug("setting new cache loader in bucket region: {}", newLoader);
}
mut.setCacheLoader(newLoader);
}
});
{code}
However, that can miss buckets that are currently being created, because they read the existing value for cache loader first, and then later are added to localBucket2RegionMap - see PartitionedRegionDataStore.grabFreeBuckets.
The net result is that some buckets can end up with null for the cache loader. If gets a routed to those buckets, they will not invoke the cache loader.
On fix might be to get the PartitionedRegionDataStore.bucketCreationLock in cacheLoaderChanged.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)