Notifications

930 views

Description


 
The ServiceNow clone process does not include the text index data and after each clone a regenerate text index process is executed on the target instance (Post-clone cleanup scripts).
 
This is done post-clone and the instance is available; but, there may not be searchable text data for hours to days for some customers until the regenerate text index process as completed.
 
This can be made better by setting/creating two properties in the target instance and add these properties to the data preservers.
 
Additionally, since the TASK table generally is the largest table and the longest to index; we might consider re-ordering the text indexes to index TASKS last; so that, at least, all other tables will be processed sooner.
 
Making these changes can reduce the regenerate text index process by 10% to 30%.

Steps to Implement


 

1) In the target instance, update or add these two properties.

  • Name: glide.ts.index.parallelism | Type: integer | Value: 12
  • Name: glide.ts.nibble_pause | Type: integer | Value: 5000

2) Create a data preserver so these properties will remain post clone.

3) In the source instance, modify the cleanup script that regenerates the text indexes to first reorder the text indexes to set the order of the TASK table to last.

  • Navigate to the System Clone > Clone Definition > Cleanup Scripts module.
  • Find the cleanup script named "Regenerate all text indexes" and open the form.
  • Modify the script as folllows:
var gr = new GlideRecord('ts_index_name');
gr.addQuery('table', 'task');
gr.query();
if (gr.next()) {
gr.number = 999;
gr.update();
}

new GlideTextIndexEvent().indexAllNoPurge();

Additional Information


Warning: Setting the property glide.ts.index.parallelism over 12 has lead to memory issues, this property should not be change from the default 8 in a production instance.

Also, take a look at the following KB article on how to identify slow "lookup" variables that can contribute to slow text index regeneration for the task table:

How to Identify Slow Lookup Variables in the Service Catalog
 

Article Information

Last Updated:2019-06-17 20:07:25
Published:2019-06-18