Workaround for Increasing Redundant Copies Online in Tanzu GemFire
search cancel

Workaround for Increasing Redundant Copies Online in Tanzu GemFire

book

Article ID: 441382

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Users attempting to increase the redundancy level of a Tanzu GemFire partitioned region (e.g., from 1 to 2) using the "gfsh alter region" command find that the --redundant-copies option is not supported.

In production environments where dropping and recreating the region is not feasible due to data risk and uptime requirements, an online workaround is required.

Environment

Tanzu GemFire
10.1.x and earlier

Cause

In GemFire v10.1.3 and earlier versions, the redundant-copies attribute is immutable for an existing region. The gfsh alter region command is designed to modify runtime parameters that do not require a structural re-partitioning of existing buckets.

Resolution

To increase redundancy without a maintenance window or data loss, use one of the following migration strategies:

Option 1: Parallel Region Migration (Single Cluster)

  1. Create New Region: Define a new region with the desired configuration: gfsh> create region --name=NewRegion --type=PARTITION_REDUNDANT --redundant-copies=2
  2. Synchronize Data:
    • Attach an AsyncEventQueue (AEQ) to the original region to capture real-time updates and forward them to the new region.
    • Execute a data copy function or batch job to migrate existing entries from the old region to the new region.
  3. Switch Clients: Update application configurations to point to the new region name.
  4. Verify Redundancy: Run gfsh> show metrics --region=/NewRegion to confirm redundancy status.

Option 2: Blue/Green Cluster Migration (Cross-Cluster)

  1. Deploy Green Cluster: Set up a secondary cluster with the target region configuration (--redundant-copies=2).
  2. WAN Replication: Configure WAN gateways between the Blue (Current) and Green (New) clusters.
  3. Migrate Data: Use wan-copy or a snapshot export/import to populate the Green cluster.
  4. Cutover: Redirect client traffic to the Green cluster once the queues are drained and data is synchronized.

Post-Migration Optimization

After migration, ensure the cluster is balanced to avoid resource exhaustion:

  • Run gfsh> rebalance --include-redundant=true 
  • Run gfsh> restore redundancy to ensure all buckets have the required number of copies.