You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Darrel Schneider (JIRA)" <ji...@apache.org> on 2018/04/03 18:19:00 UTC

[jira] [Commented] (GEODE-4920) Alter region does not update PartitionRegionConfig of the region

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

Darrel Schneider commented on GEODE-4920:
-----------------------------------------

It looks to me like the eviction attributes are broken. EvictionAttributesMutator lets you change the maximum but this code ignores that change when updating the PartitionRegionConfig:
{noformat}
private PartitionRegionConfig getPRConfigWithLatestExpirationAttributes() {
PartitionRegionConfig prConfig = this.prRoot.get(getRegionIdentifier());
return new PartitionRegionConfig(prConfig.getPRId(), prConfig.getFullPath(),
prConfig.getPartitionAttrs(), prConfig.getScope(), prConfig.getEvictionAttributes(),
this.getRegionIdleTimeout(), this.getRegionTimeToLive(), this.getEntryIdleTimeout(),
this.getEntryTimeToLive(), prConfig.getGatewaySenderIds());
}
{noformat}
Note that this code gets the mutated expiration attributes but rereads the eviction attributes from the existing prConfig.
 The PartitionRegionConfig only uses this to log a warning so it is not a huge problem:
{noformat}
if (ea.getAction().isLocalDestroy()) {
// LRUHeap doesn't support maximum, but other eviction algos do
if (!ea.getAlgorithm().isLRUHeap() && ea.getMaximum() != prconfEa.getMaximum()) {
logger.warn(LocalizedMessage.create(
LocalizedStrings.PartitionedRegion_0_EVICTIONATTRIBUTES_1_DO_NOT_MATCH_WITH_OTHER_2,
new Object[] {pr.getFullPath(), ea, prconfEa}));
}
}
{noformat}

> Alter region does not update PartitionRegionConfig of the region
> ----------------------------------------------------------------
>
>                 Key: GEODE-4920
>                 URL: https://issues.apache.org/jira/browse/GEODE-4920
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh, regions
>            Reporter: nabarun
>            Priority: Major
>
> While using the "alter region" gfsh command to update / mutate the region with new attributes like eviction parameters, the new attributes are not updated in the PartitionedRegionConfig.
> This maybe important because PartitionRegionConfig members are used to determine colocation complete, validation of the gatewaySenders etc.
> GEODE-4919 PR has been raised to add the gateways senders to the PR config.
> We need to determine which command parameters of "alter region" command need to be updated to the PRConfig after the region is altered



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)