Skip to content

Conversation

@dimitris-athanasiou
Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou commented Mar 23, 2020

When we index data frame analytics stats docs we do not
need to refresh immediately.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LOGGER.debug("[{}] Refreshing indices {}", jobId, Arrays.toString(refreshRequest.indices()));
LOGGER.debug(() -> new ParameterizedMessage("[{}] Refreshing indices {}", jobId, Arrays.toString(refreshRequest.indices())));

I think the string is created eagerly. This is not strictly necessary unless the logging level is debug.

This is a minor thing as most of our logging does not take this into account.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to also refresh dest index in this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use the config's headers to refresh the dest index which is why I kept it separate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thanks for explanation.

When we index data frame analytics stats docs we do not
need to refresh immediately.
@dimitris-athanasiou dimitris-athanasiou force-pushed the no-refresh-on-indexing-dfa-stats branch from 13e6010 to 5ea3e2d Compare March 24, 2020 08:53
Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, thanks for explanation.

@dimitris-athanasiou dimitris-athanasiou merged commit 4cf1d1a into elastic:master Mar 24, 2020
@dimitris-athanasiou dimitris-athanasiou deleted the no-refresh-on-indexing-dfa-stats branch March 24, 2020 10:09
dimitris-athanasiou added a commit that referenced this pull request Mar 24, 2020
When we index data frame analytics stats docs we do not
need to refresh immediately.

Backport of #53977
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants