Skip to content

Commit

Permalink
Added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jloleysens committed Mar 12, 2020
1 parent 876884a commit bf62424
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ export const reindexServiceFactory = (
const startReindexing = async (reindexOp: ReindexSavedObject) => {
const { indexName, reindexOptions } = reindexOp.attributes;

// Where possible, derive reindex options at the last moment before reindexing
// to prevent them from becoming stale as they wait in the queue.
const indicesState = await esIndicesStateCheck(callAsUser, [indexName]);
const openAndClose = indicesState[indexName] === 'close';
if (indicesState[indexName] === 'close') {
Expand Down

0 comments on commit bf62424

Please sign in to comment.