Triggering Remote Index Sync

The CDL provides a utility to sync the indexes with its remote peers. The utility can be used in the scenarios such as post site isolation, where there is a huge difference in the number of index records between the sites. The CDL also supports a command to check the status of the remote index sync.

Note
  • It is recommended to use the remote sync only if there is a huge difference in the index records between the sites as this might impact the performance.

  • The geo-remote-site should be configured to view the commands.

Trigger remote index sync for,

  • a list of index mapIDs or all mapIDs from the cli.

  • a list of sliceNames or all the sliceNames.

Note the following:

  • Ensure the conditions below are met to avoid errors while triggering a remote sync for index with its peers.

    • The custom map-ids and slice-names should be unique.

    • Only valid index map-ids and slice-names are allowed.

    • Remote site is reachable.

  • Internally, CDL retries a maximum of 3 times to sync with its remote peer.

  • The remote index sync skips the index instance if the sync is already ongoing for that instance.

Command

cdl actions remote-index-sync start [options] 

Options

  • map-id

    Index map-id for which the remote index sync should start. The map-id is optional. If included, triggers remote index sync for all the instances of that index map-id. A maximum of 5 map-ids can be given using this option.

  • slice-name

    The slice-name for which the remote index sync starts. The slice-name is optional. If included, triggers remote index sync for all the slice-names. There is no limit for the number of slice-names.

Output Parameter

triggered-instances

Shows the list of index instances for which the remote index sync has been started.

Example

cdl actions remote-index-sync start map-id { 1 } map-id { 2 }  
slice-name { session-1 } slice-name { session-2 } 

Output

triggered-instances 'index-mapID-1-instanceID-1,  
index-mapID-1-instanceID-2, index-mapID-2-instanceID-1, index-m 

Check the Remote Sync Status

The remote sync status shows the index instances for which the remote index sync is in progress.

Note

The remote sync status does not show the sync status per sliceName. If the sync status shows that a particular index instance is syncing with the remote site, it means all the sliceNames or the listed sliceNames are syncing one after the other.

Command

cdl actions remote-index-sync status 

Output parameter

syncing-instances

List of index instances for which the remote index sync is in progress.

Example

cdl actions remote-index-sync status  

Output

syncing-instances 'index-mapID-1-instanceID-1, index-mapID-1-instanceID-2, index-mapID-2-instanceID-1, index-mapID-2-instanceID-2’ 

Troubleshooting

The following warning or error logs in Index pods show the status of the remote index sync.

  • The sync is successful with the following:

    Log:

    Bulk Sync done from Remote Indexes(s) for isInitSync = false 

    Example:

    [datastore.index.session] Bulk Sync done from Remote Indexes(s) for isInitSync = false sliceName = session via DBApp
    

    Log:

    Sync finished successfully with Remote MemoryMap App isInitSync: false 
    

    Example:

    [datastore.index.session] Sync finished successfully with Remote MemoryMap App isInitSync: false count: 100 Time taken: 16.699031ms sliceName: session
  • The sync fails with the following error log:

    Example:

    Error! Remote Bulk Read failed 3 times for isInitSync = false