Skip to content

Commit

Permalink
Attempt to avoid a commit request that does not return for an extende…
Browse files Browse the repository at this point in the history
…d time
  • Loading branch information
marblestation committed May 30, 2023
1 parent 1f8b2b0 commit c012393
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def run():

# issue commit
commit_time = datetime.datetime.utcnow()
r = requests.get(update_url + '?commit=true')
r = requests.get(update_url + '?commit=true&waitSearcher=false')
r.raise_for_status()
logger.info('Issued async commit to SOLR')

Expand All @@ -119,8 +119,8 @@ def run():
if t > commit_time:
finished = True
time_waiting = datetime.datetime.utcnow() - commit_time
if (time_waiting.seconds > (3600 * 2)):
logger.warn('Solr commit running for over two hours, aborting')
if (time_waiting.seconds > (3600 * 3)):
logger.warn('Solr commit running for over three hours, aborting')
raise
if not finished:
time.sleep(30)
Expand Down Expand Up @@ -223,7 +223,7 @@ def monitor_solr_writes():
logger.info('monitoring docsPending with current_docs_pending {}, previous_docs_pending {}, consecutive_match_count {}'.format(current_docs_pending, previous_docs_pending, consecutive_match_count))
time.sleep(30)
logger.info('completed monitoring of docsPending on solr with current_docs_pending {}, previous_docs_pending {}, consecutive_match_count {}'.format(current_docs_pending, previous_docs_pending, consecutive_match_count))


if __name__ == '__main__':
run()

0 comments on commit c012393

Please sign in to comment.