lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Solr 5.2.1 replication hangs possibly during segment merge after a delete operation
Date Tue, 29 Jan 2019 12:33:37 GMT
On 1/28/2019 5:39 PM, Ravi Prakash wrote:
> I have a situation where I am trying to setup a once daily cron job on the master node
to delete old documents from the index based on our retention policy.

This reply may not do you any good.  Just wanted you to know up front 
that I might not be helpful.

> The cron job basically does this (min and max are a day dange):
>      DELETE="\"started:[${MINDATE} TO ${MAXDELDATE}]\""
>       /opt/solr/bin/post -c <corename> -type application/json -out yes -commit
yes -d {delete:{query:"$DELETE"}}

That is a delete by query.

Are you possibly asking Solr to background optimize the index before you 
do the deleteByQuery?  Because if you do something that begins a merge, 
then issue a deleteByQuery while the merge is happening, the delete and 
all further changes to the index will pause until the merge is done.  An 
optimize is a forced merge and can take a very long time to complete. 
Getting around that problem involves using deleteById instead of 

I have no idea whether replication would be affected by the blocking 
that deleteByQuery causes.  I wouldn't expect it to be affected, but 
I've been surprised by Solr's behavior before.


View raw message