Push to Live (PTL) in Search

When Staging Propagation starts, the publish operation on the Authoring Transaction server will push or replicate all production ready changes from the Auth database to the Live database.

This Push-To-Live (PTL) approach no longer requires replicating to Subordinate nodes. Instead, a copy of the new Live index will be created in the Live environment and will be swapped in once the new index is ready. The old version will be de-commissioned immediately.

The Push-To-Live process copies production-ready changes in the search database from the authoring environment to the production environment.

NiFi PTL pipeline

For push to Live environment operations for stores, NiFi has a separate pipeline. The PTL pipeline is made up of many process groups, which are described in the slides below.

StagingProp need not be executed prior to Push-To-Live, although doing so is still advised.

The Push-To-Live Pipeline perform following operation:
  • Clone Indices.
  • Push Zookeeper auth node to Live environment.
  • Remove workspace information and unlock Live indices.
  • Copy calculated price and run Near Real-Time (NRT) indexing to populate inventory details base on Live data.
  • Send Invalidation for objects changes in auth.
HCL Commerce Version 9.1.13.0 or later

Index build sequence for Live environments

When you are working in the Live environment, build the Live inventory index before running Push-to-Live. If you do not follow this sequence, the inventory in the product index will not be synchronized with the Live database. Build the index using the following REST call. This example assumes you are indexing the live.inventory connector.
POST https://ingestServerHostname:port/connectors/live.inventory/run?storeId=storeId

Purpose of PTL pipeline

The NiFi push-to-live pipeline's objective is to use the index clone method to move indices from authoring to Live environment. If you do not want to execute a full reindex for Live indices, you may use push to Live environment to shift the authoring indices to Live environment.

Push to Live pipeline can be triggered with storeId parameter for which you need to trigger the PTL. This will return the runId as a response.
POST -- https://ingestHost:ingetsPort/connectors/push-to-live/run?storeId=1
Use the API listed below to verify the PTL run's status.
GET - https://ingestHost:ingetsPort/connectors/push-to-live/runs/{runId}
HCL Commerce Version 9.1.15.0 or laterNote: The first time you run push-to-live, you could receive an error message similar to:
storeId: 12001 Indexing Job is Completed with Errors. Error encountered while cloning index auth.store 
If this occurs, re-run the push-to-live operation. It will be successful in that and subsequent runs.

Difference between PTL and Live Full Index

The main difference between PTL and full reindexing in the Live environment is as follows:
  • Using the index clone approach, PTL copies the index from source to target, in this case from authentication to Live environment.
  • The full indexing operation for Live environment will work exactly the same as the Auth environment indexing operation, except that the Live environment full indexing pipeline will read data from the Live database.
    Using the API below will trigger a full reindex for Live environment.
    POST - https://ingestHost:ingetsPort/connectors/live.reindex/run?storeId=1
    
    To check the status of the full reindex in Live environment, use the following:
    GET - https://ingestHost:ingetsPort/connectors/live.reindex/runs/{runId}
    
Clone Indices
  • This process group blocks the write operation on the auth index.
  • This process group releases blocked write operations from the target index.
  • This process group unblocks the write operation on the auth index.
Push Zookeeper auth node to Live environment

This process group clones the Zookeeper node from auth to Live environment.

This process group removes the workspace document from the Live index.

  • This process group releases blocked write operations from the target index.
  • This process group removes workspace specific document from Live index.
Price and Inventory
  • This process group copies the calculated price for product.
  • This process group triggers the NRT pipeline to populate the inventory of product.
Send Fine Grain Invalidations

This process group sends invalidation for objects which were changed in the workspace context.