How to Clear Gateway Count in GemFire
search cancel

How to Clear Gateway Count in GemFire

book

Article ID: 387012

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

A customer needs to update a large number of records in a GemFire region on WAN Site A without syncing data to WAN Site B, while avoiding performance issues caused by Gateway Senders.

Cause

When performing large data updates, the automatic syncing of changes via Gateway Senders can put pressure on the system. Pausing the Gateway temporarily stops event dispatching, but events continue to accumulate in the queue, leading to potential issues when resuming the sync. Removing the Gateway sender temporarily helps ensure that no data changes are transferred between environments during the update, allowing the data to be refreshed safely.

Resolution

Disclaimer: There is no direct way to clear the Gateway count in GemFire. However, the following steps can help manage the update process without overwhelming the Gateway queues.

 

To manage the updates efficiently, without overwhelming the Gateway queues, follow the steps outlined for the two scenarios below:

Scenario 1: When Changes Occur on the Region During the Update Period

  • Pause Gateway Senders on WAN Site B to prevent changes from being transmitted while the region is being updated.
  • Move traffic from WAN Site A to WAN Site B.
  • Alter the configuration of Region X on WAN Site A to remove the Gateway Sender using the following GFSh command:  


gfsh> alter region --name=regionX --gateway-sender-id="" 

  • Remove all existing records from Region X on WAN Site A and add the new data. No events will be queued in the Gateway Sender during this process.
  • Re-add the Gateway Sender to Region X on WAN Site A, ensuring it is configured on all nodes and started.
  • Monitor the Gateway queue on WAN Site B to ensure that all events are processed and the queue is emptied.
  • Move traffic back to WAN Site A once synchronization is complete and the Gateway queue is empty.
  • Export the updated data from Region X on WAN Site A and import it into Region X on WAN Site B to maintain consistency across sites.

Scenario 2: When No Changes Occur on the Region During the Update Period

  • Move traffic from WAN Site A to WAN Site B.
  • Alter the configuration of Region X on WAN Site A to remove the Gateway Sender using the following GFSh command: gfsh> alter region --name=regionX --gateway-sender-id="" 

  • Remove all existing records from Region X on WAN Site A and add the new data . No events will be queued in the Gateway Sender during this process.
  • Re-add the Gateway Sender to Region X on WAN Site A, ensuring it is configured on all nodes and started.
  • Move traffic back to WAN Site A once synchronization is complete and the Gateway queue is empty.
  • Export the updated data from Region X on WAN Site A and import it into Region X on WAN Site B to maintain consistency across sites.

Additional Information

  • It is highly recommended to perform these operations in a test environment before applying them in production to verify the effectiveness and minimize any potential disruption.
  • Ensure that the Gateway Sender configuration is re-applied on all relevant nodes to avoid any data loss.