Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This document will explain the steps that are to be followed to optimize Solr Index in SCSB.

Steps:

Enable maintenance mode for SCSB
  1. Get in into server 3 and execute following commands
cd scripts
bash setmaintmode   // this will ask confirmation. Enter 1 for yes.

After maintenance mode enabled, SCSB maintenance page will be shown for UI

Take all containers down
  1. Stop all containers on both prod servers.
Start SOLR optimization
  1. Start Solr Server on one server with non replication mode (We did change in jenkins job to set REPLICATION as ‘false’ and memory to 26GB)
  2. Launch Solr admin page and take count of records for verification purpose.
  3. Initiate optimize from solr admin page by pushing “optimize now” button.

Eg screen:

Once you initiate the process you will see log something like this “o.a.s.u.DirectUpdateHandler2 Starting optimize... Reading and rewriting the entire index! Use with care.”

It will take some time to finish it. If you finish you will see following screen

Now solr is optimized. Verify the records count before and after. Need to start replication on second server.

Replication
  1. Stop SOLR on both server
  2. Remove old scsb-zookeeper data directory from 3 prod servers.
  3. Run fresh zookeeper container on 3 prod servers.
  4. Start SOLR on prod server where optimization is done. Start with replication mode. (REPLICATION is true and memory is 6GB)
  5. Verify the Solr admin page.
  6. Now build fresh SOLR on second server with replication mode (remove/move old index from second server)
  7. Once solr server started, Zookeeper with start process to sync the data from Server 1 to Server 2. It will take about 10 mins to finish it.
  8. Once its done you can see both servers are in active in solr admin page (admin page → cloud)
  9. Verify records count between two servers.
Bring all containers
  1. Start all containers on both servers.

  2. Verify manually and make sure all good.

Reset Maintenance Mode:

Get in into server 3 and execute following commands

cd scripts


bash resetmaintmode   // this will ask confirmation. Enter 1 for yes.

After maintenance mode disabled, SCSB UI show should displayed

Prod Solr Optimization Statistics - Sep 11 2017

S. No

Before/After Optimize

Total Count

Bib Count

Holdings Count

Items Count

Disk Size in GB

Deleted Docs

1

Before

30718785

8293444

8585168

13840173

22.41

8258838

2

After

30718785

8293444

8585168

13840173

17.29

0

Image Reference

Before

After


  • No labels